<?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: Emin ÜZÜN</title>
    <description>The latest articles on DEV Community by Emin ÜZÜN (@emuzinun).</description>
    <link>https://dev.to/emuzinun</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%2F4150915%2F96c016de-77f4-4db1-8b6a-21612bf9629c.jpg</url>
      <title>DEV Community: Emin ÜZÜN</title>
      <link>https://dev.to/emuzinun</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/emuzinun"/>
    <language>en</language>
    <item>
      <title>What Is Host Header Injection? Detection to Exploitation with Burp</title>
      <dc:creator>Emin ÜZÜN</dc:creator>
      <pubDate>Thu, 19 Nov 2026 20:01:33 +0000</pubDate>
      <link>https://dev.to/emuzinun/what-is-host-header-injection-detection-to-exploitation-with-burp-2d1k</link>
      <guid>https://dev.to/emuzinun/what-is-host-header-injection-detection-to-exploitation-with-burp-2d1k</guid>
      <description>&lt;p&gt;There's a small line inside every HTTP request: the "Host" header.&lt;/p&gt;

&lt;p&gt;When your browser goes to a site, it tells the server "this is where I've come." Since hundreds of sites can live on a single server, the server figures out which one you want from this line.&lt;/p&gt;

&lt;p&gt;But some applications trust this header too much.&lt;/p&gt;

&lt;p&gt;The Host header is entirely under the user's control. If you want, you write your own domain there, and the server takes it as correct and uses it. That's exactly where &lt;strong&gt;Host Header Injection&lt;/strong&gt; begins.&lt;/p&gt;

&lt;p&gt;So where does the application get into danger when it uses this header? The most classic spot is &lt;strong&gt;password reset&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You forgot your password, so you click "reset my password." The server sends you an email with a link in it. &lt;strong&gt;Where does it get that link's domain from?&lt;/strong&gt; Some applications pull their own address from the Host header.&lt;/p&gt;

&lt;p&gt;If the attacker points Host to their own server, the reset link goes to their server too.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Burp Suite&lt;/strong&gt; is all you need to see this flaw. I'll show it on the &lt;strong&gt;Basic password reset poisoning&lt;/strong&gt; lab from &lt;strong&gt;PortSwigger Web Security Academy&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffxmg507uw116tn97e5wn.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffxmg507uw116tn97e5wn.webp" alt="PortSwigger lab description" width="800" height="324"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the lab, our victim is "carlos." The task is to take over his account. It also gives you an "exploit server."&lt;/p&gt;

&lt;p&gt;First you go to the login page and click "Forgot password?". You type carlos's username and send the request.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd4xeawwqy51dlqo840tv.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd4xeawwqy51dlqo840tv.webp" alt="Forgot password form" width="800" height="351"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Burp catches this request.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fepy9ni821gfgjs7ada2l.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fepy9ni821gfgjs7ada2l.webp" alt="Capturing the request with Burp" width="800" height="630"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You send the request to &lt;strong&gt;Repeater&lt;/strong&gt;, because there you can easily change the Host header and try again and again.&lt;/p&gt;

&lt;p&gt;You find the Host line. It shows the lab's own address.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdt4wv1jmawvm2u6zp87c.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdt4wv1jmawvm2u6zp87c.webp" alt="The Host line in Repeater" width="800" height="548"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There's a small trap here. Modern labs send the request as &lt;strong&gt;HTTP/2&lt;/strong&gt;. In HTTP/2 the host information isn't in the normal Host: line but in the hidden &lt;strong&gt;:authority&lt;/strong&gt; field. So if you only change the Host line, you may get a &lt;strong&gt;400&lt;/strong&gt; saying &lt;strong&gt;Host header not present&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In Repeater, switch the HTTP version to &lt;strong&gt;HTTP/1&lt;/strong&gt; from the settings icon at the top right of the request. Now the Host line works normally.&lt;/p&gt;

&lt;p&gt;One more warning: write only the &lt;strong&gt;hostname&lt;/strong&gt; in the Host value. Don't add things like "https://" at the start or "/exploit" at the end, or it's treated as invalid again.&lt;/p&gt;

&lt;p&gt;You delete the Host line and write the exploit server's address.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="nc"&gt;Host&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;YOUR&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="no"&gt;ID&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;exploit&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;net&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You hit Send.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Feaqyd1acc4wnl2objc5b.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Feaqyd1acc4wnl2objc5b.webp" alt="200 response with the poisoned Host" width="800" height="496"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The server returns 200. It accepted the request.&lt;/p&gt;

&lt;p&gt;What happens in the background? The server sends a reset email to the user carlos and takes the link's domain from the Host we wrote. So the link now points to our exploit server.&lt;/p&gt;

&lt;p&gt;carlos opens that email and clicks the link (the lab simulates this automatically). The moment he clicks, the reset token lands on our server.&lt;/p&gt;

&lt;p&gt;Where do we see the token? In the exploit server's access log.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flyn82p0nvumsq4xqlkic.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flyn82p0nvumsq4xqlkic.webp" alt="The token landing in the access log" width="800" height="344"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the log you see carlos's GET request and the token in it. This token is the key to the reset page.&lt;/p&gt;

&lt;p&gt;Now you take that token and paste it into the normal reset link. In the form that opens, you can change carlos's password.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu6bg3gafwd1q8evmy0c6.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu6bg3gafwd1q8evmy0c6.webp" alt="Resetting the password with the token" width="800" height="369"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The token worked and the password was changed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbvcjxf7adqb5nz9rxyq3.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbvcjxf7adqb5nz9rxyq3.webp" alt="Lab solved" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;"Congratulations, you solved the lab"&lt;/p&gt;

&lt;p&gt;That's really all there is to the detection part. All you do is change the Host header and check whether the response or the application's behavior changes. If it shows up on the page or makes it into the email link, there's a flaw.&lt;/p&gt;

&lt;p&gt;Also, some applications filter Host but forget the "&lt;strong&gt;X-Forwarded-Host&lt;/strong&gt;" header. So if Host doesn't work, try adding this to the request.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="no"&gt;X&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Forwarded&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Host&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;attacker&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Often the filter checks Host but not this header, and the same flaw can be sitting there.&lt;/p&gt;

&lt;p&gt;As for protection, the server should never take its absolute address from the Host header. It should keep a fixed list of domains or read it from configuration. You can't trust a header the user sends.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://portswigger.net/web-security/host-header
https://portswigger.net/web-security/host-header/exploiting/password-reset-poisoning
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;em&gt;Originally written in Turkish on &lt;a href="https://eminuzun.com/blog/host-header-injection/" rel="noopener noreferrer"&gt;eminuzun.com&lt;/a&gt;. AI was used only for the translation.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>webdev</category>
      <category>http</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>What Is Hashcat? Installation and Basic Usage</title>
      <dc:creator>Emin ÜZÜN</dc:creator>
      <pubDate>Thu, 19 Nov 2026 20:01:32 +0000</pubDate>
      <link>https://dev.to/emuzinun/what-is-hashcat-installation-and-basic-usage-nlf</link>
      <guid>https://dev.to/emuzinun/what-is-hashcat-installation-and-basic-usage-nlf</guid>
      <description>&lt;p&gt;Hashcat is a &lt;strong&gt;password cracking&lt;/strong&gt; tool.&lt;br&gt;
If you have a hash value and want to find the password, it's one of the tools you turn to.&lt;/p&gt;

&lt;p&gt;Systems don't store passwords as plain text. When you type "password", the system first runs it through a hash function.&lt;br&gt;
Like &lt;strong&gt;MD5, SHA-256, bcrypt&lt;/strong&gt;.&lt;br&gt;
The resulting value is always the same, but reversing it is extremely hard computationally.&lt;br&gt;
Hashcat doesn't actually try to reverse it. It hashes every word in your wordlist and compares it with your value. In other words, it tries to find a match.&lt;br&gt;
It's a tool people often turn to in &lt;strong&gt;pentests and CTF&lt;/strong&gt; solutions.&lt;/p&gt;
&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;If you're on Linux:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo apt update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; sudo apt install hashcat
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For &lt;strong&gt;Windows&lt;/strong&gt;, you can download the zip from hashcat.net and extract it.&lt;/p&gt;

&lt;p&gt;Keep your GPU drivers up to date. If you're using NVIDIA you need &lt;strong&gt;CUDA&lt;/strong&gt;; for AMD, &lt;strong&gt;OpenCL&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;To verify the installation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;hashcat --version
&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/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffwg8vjck4kwlmqga2cp5.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffwg8vjck4kwlmqga2cp5.webp" alt="Terminal output showing the Hashcat version" width="237" height="90"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Identifying the Hash Type
&lt;/h2&gt;

&lt;p&gt;You need to tell Hashcat which hash type you're trying to crack, because each algorithm has a different mode number. If you don't know what your hash is, you can identify it with &lt;strong&gt;hash-identifier&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;hash-identifier
&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/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdkog1mayxyky1uxkqxmr.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdkog1mayxyky1uxkqxmr.webp" alt="hash-identifier start screen in the terminal" width="713" height="404"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Run it, paste the hash, and it tells you the type. Mode 0 for MD5, 1400 for SHA-256, 1000 for NTLM&lt;/p&gt;

&lt;h2&gt;
  
  
  Dictionary Attack
&lt;/h2&gt;

&lt;p&gt;You can write the hash directly into the command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;hashcat -m 0 -a 0 5f4dcc3b5aa765d61d8327deb882cf99 /usr/share/wordlists/rockyou.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'll see this as output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;5f4dcc3b5aa765d61d8327deb882cf99:password
&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/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7gh6b3jl4seeslvibkra.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7gh6b3jl4seeslvibkra.webp" alt="hashcat output showing the hash cracked as password with a dictionary attack" width="718" height="666"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So a password like "password" is worth nothing even if it's stored with MD5.&lt;/p&gt;

&lt;p&gt;If you can't find rockyou.txt, look under &lt;strong&gt;/usr/share/wordlists/&lt;/strong&gt;; it might be compressed. You can extract it with &lt;strong&gt;sudo gunzip /usr/share/wordlists/rockyou.txt.gz&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Brute Force Attack
&lt;/h2&gt;

&lt;p&gt;If it's not in the wordlist, try brute force too. Hashcat does this a bit more smartly with a &lt;strong&gt;mask attack&lt;/strong&gt;. For example, you can specify a password made up of exactly 6 digits:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;hashcat -m 0 -a 3 5f4dcc3b5aa765d61d8327deb882cf99 ?d?d?d?d?d?d
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;?d&lt;/strong&gt; means a digit.&lt;/p&gt;

&lt;p&gt;Similar masks:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;?l&lt;/strong&gt; lowercase letter&lt;br&gt;
&lt;strong&gt;?u&lt;/strong&gt; uppercase letter&lt;br&gt;
&lt;strong&gt;?a&lt;/strong&gt; all (digit + letter + special character)&lt;/p&gt;

&lt;p&gt;For an 8-character, lowercase-only password:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;hashcat -m 0 -a 3 5f4dcc3b5aa765d61d8327deb882cf99 ?l?l?l?l?l?l?l?l
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Rules Attack
&lt;/h2&gt;

&lt;p&gt;A somewhat beefed-up version of the dictionary attack. It applies automatic transformations to the words in the wordlist. If password is in there, it tries possibilities like &lt;strong&gt;Password, p@ssword, password1&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;hashcat -m 0 -a 0 5f4dcc3b5aa765d61d8327deb882cf99 rockyou.txt -r /usr/share/hashcat/rules/best64.rule
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;best64.rule&lt;/strong&gt; is the most commonly used rule set. It comes with hashcat on Kali.&lt;/p&gt;

&lt;h2&gt;
  
  
  Results and Benchmark
&lt;/h2&gt;

&lt;p&gt;To see the results again after cracking is done:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;hashcat -m 0 --show 5f4dcc3b5aa765d61d8327deb882cf99
&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/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftby1q15rboy86e1v6x81.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftby1q15rboy86e1v6x81.webp" alt="Showing a previously cracked hash result again with the --show command" width="527" height="78"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to see how fast your GPU is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;hashcat -m 0 --benchmark
&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/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5b3swp2qp473xszskytm.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5b3swp2qp473xszskytm.webp" alt="hashcat benchmark output with hash/second speed values for MD5" width="723" height="207"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There's a Speed line in the output. It reports it in hashes per second. With lightweight algorithms like MD5, you can reach billions of hashes per second with a GPU.&lt;br&gt;
If you don't have a GPU or you get a &lt;strong&gt;no devices found&lt;/strong&gt; error, add &lt;strong&gt;--force&lt;/strong&gt; to the end of the command. It runs on the CPU, but slower.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally written in Turkish on &lt;a href="https://eminuzun.com/blog/hashcat-nedir-kurulum-ve-temel-kullanim/" rel="noopener noreferrer"&gt;eminuzun.com&lt;/a&gt;. AI was used only for the translation.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>cryptography</category>
      <category>linux</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>SQL Injection with SQLmap on Kali: From Login Form to Database</title>
      <dc:creator>Emin ÜZÜN</dc:creator>
      <pubDate>Wed, 21 Oct 2026 22:45:09 +0000</pubDate>
      <link>https://dev.to/emuzinun/sql-injection-with-sqlmap-on-kali-from-login-form-to-database-48lp</link>
      <guid>https://dev.to/emuzinun/sql-injection-with-sqlmap-on-kali-from-login-form-to-database-48lp</guid>
      <description>&lt;p&gt;The &lt;strong&gt;Sqlmap&lt;/strong&gt; tool is an &lt;strong&gt;open-source&lt;/strong&gt; tool that automates SQL injection testing.&lt;br&gt;
It can handle what's done manually with a few commands.&lt;/p&gt;

&lt;p&gt;SQL injection: simply put, if a web application sends the input it takes from the user straight to the database without filtering it, you can write SQL code there.&lt;br&gt;
It could be a login form, a search box, a URL parameter, etc.&lt;br&gt;
The application runs that code and the data in the database comes out.&lt;/p&gt;
&lt;h2&gt;
  
  
  Installing Docker and SQLmap
&lt;/h2&gt;

&lt;p&gt;You need to test against a vulnerable application you set up yourself, not a real system.&lt;br&gt;
For this we'll use &lt;strong&gt;DVWA (Damn Vulnerable Web Application)&lt;/strong&gt;.&lt;br&gt;
It runs with &lt;strong&gt;Docker&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Installation:&lt;/strong&gt;&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;sudo &lt;/span&gt;apt update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; docker.io
&lt;span class="nb"&gt;sudo &lt;/span&gt;service docker start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Sqlmap:&lt;/strong&gt;&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;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; sqlmap
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;sqlmap already comes installed on &lt;strong&gt;Kali Linux&lt;/strong&gt;, but it's still worth running this to bring it up to the latest version.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start DVWA
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;--rm&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; 80:80 vulnerables/web-dvwa
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The container comes up with a single command.&lt;/p&gt;

&lt;p&gt;From your browser, open&lt;br&gt;
&lt;a href="http://localhost/login.php" rel="noopener noreferrer"&gt;http://localhost/login.php&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's enter the login credentials as &lt;strong&gt;admin and password&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkekp07139go2hjuhpzm2.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkekp07139go2hjuhpzm2.webp" alt="Logging in on the DVWA login screen with admin and password" width="451" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the setup page, click the &lt;strong&gt;Create - Reset Database&lt;/strong&gt; button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbhbpms332lgxvv6ez8z0.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbhbpms332lgxvv6ez8z0.webp" alt="Creating the database on the DVWA setup page" width="800" height="973"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then log in again. Set the security level to &lt;strong&gt;Low&lt;/strong&gt; from the &lt;strong&gt;DVWA Security&lt;/strong&gt; menu.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnmn87lgbvrba12n23jdp.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnmn87lgbvrba12n23jdp.webp" alt="Security level set to Low in the DVWA Security menu" width="800" height="791"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then go to the SQL injection page from the left menu.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmun9i85hp8p35orwwvq7.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmun9i85hp8p35orwwvq7.webp" alt="DVWA SQL Injection page" width="800" height="769"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;sqlmap needs the &lt;strong&gt;session cookie&lt;/strong&gt; so it can act as if it's logged in to the application.&lt;/p&gt;

&lt;p&gt;Let's grab the &lt;strong&gt;PHPSESSID&lt;/strong&gt; value from &lt;strong&gt;F12 - Application - Cookies - localhost&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frz2a12tszegx8ldp30v3.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frz2a12tszegx8ldp30v3.webp" alt="PHPSESSID cookie value in the browser developer tools" width="800" height="737"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  List the Databases
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sqlmap &lt;span class="nt"&gt;-u&lt;/span&gt; &lt;span class="s2"&gt;"http://localhost/vulnerabilities/sqli/?id=1&amp;amp;Submit=Submit"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--cookie&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"PHPSESSID=XXX; security=low"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--dbs&lt;/span&gt; &lt;span class="nt"&gt;--batch&lt;/span&gt;
&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/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2c4qqoqqg5w5ln3rtslu.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2c4qqoqqg5w5ln3rtslu.webp" alt="Listing the databases with sqlmap --dbs" width="800" height="810"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;--dbs&lt;/strong&gt; lists the available databases.&lt;/p&gt;

&lt;p&gt;If the application is vulnerable, it returns dvwa and information_schema.&lt;/p&gt;

&lt;p&gt;Adding &lt;strong&gt;--batch&lt;/strong&gt; makes sqlmap proceed through the test without asking any questions.&lt;/p&gt;

&lt;p&gt;To see the tables:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sqlmap &lt;span class="nt"&gt;-u&lt;/span&gt; &lt;span class="s2"&gt;"http://localhost/vulnerabilities/sqli/?id=1&amp;amp;Submit=Submit"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--cookie&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"PHPSESSID=XXX; security=low"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-D&lt;/span&gt; dvwa &lt;span class="nt"&gt;--tables&lt;/span&gt; &lt;span class="nt"&gt;--batch&lt;/span&gt;
&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/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzipaz1p0lmkh2uctgg3s.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzipaz1p0lmkh2uctgg3s.webp" alt="Tables in the dvwa database with sqlmap --tables" width="800" height="860"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The dvwa database shows the &lt;strong&gt;guestbook and users&lt;/strong&gt; tables.&lt;/p&gt;

&lt;p&gt;To dump the contents:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sqlmap &lt;span class="nt"&gt;-u&lt;/span&gt; &lt;span class="s2"&gt;"http://localhost/vulnerabilities/sqli/?id=1&amp;amp;Submit=Submit"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--cookie&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"PHPSESSID=...; security=low"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-D&lt;/span&gt; dvwa &lt;span class="nt"&gt;-T&lt;/span&gt; &lt;span class="nb"&gt;users&lt;/span&gt; &lt;span class="nt"&gt;--dump&lt;/span&gt; &lt;span class="nt"&gt;--batch&lt;/span&gt;
&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/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F47wk34r2u54jrl9f3js6.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F47wk34r2u54jrl9f3js6.webp" alt="Usernames and hashes in the users table with sqlmap --dump" width="800" height="723"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The usernames and MD5 hashes get dumped.&lt;br&gt;
sqlmap automatically tries to crack the hashes with a dictionary attack.&lt;br&gt;
Results like admin/password come back. If someone uses a common password, it finds it right away.&lt;/p&gt;

&lt;p&gt;You should only use it on systems you're authorized to test or that you set up yourself. That's what DVWA is for anyway.&lt;/p&gt;

&lt;p&gt;Sources:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://github.com/sqlmapproject/sqlmap
https://github.com/digininja/DVWA
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;em&gt;Originally written in Turkish on &lt;a href="https://eminuzun.com/blog/kalide-sqlmap-ile-sql-injection-login-formundan-veritabanina/" rel="noopener noreferrer"&gt;eminuzun.com&lt;/a&gt;. AI was used only for the translation.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>sql</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>From Prompt Injection to Data Leak: Agentic AI Risks</title>
      <dc:creator>Emin ÜZÜN</dc:creator>
      <pubDate>Wed, 21 Oct 2026 22:45:08 +0000</pubDate>
      <link>https://dev.to/emuzinun/from-prompt-injection-to-data-leak-agentic-ai-risks-3g5f</link>
      <guid>https://dev.to/emuzinun/from-prompt-injection-to-data-leak-agentic-ai-risks-3g5f</guid>
      <description>&lt;p&gt;When people talked about &lt;strong&gt;AI&lt;/strong&gt;, the focus in most places was on things like &lt;strong&gt;model quality, speed, context window&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;As of today, the topics being discussed have changed a bit.&lt;/p&gt;

&lt;p&gt;Now these are the questions being asked more often:&lt;br&gt;
What does it have access to? What can it do on its own? What information could it leak?&lt;/p&gt;

&lt;p&gt;This is exactly where what's called agentic AI comes in.&lt;br&gt;
It can read email. It can search for files inside a repo. It can check the calendar. It can make API calls.&lt;/p&gt;

&lt;p&gt;And this is where the risk begins.&lt;/p&gt;

&lt;p&gt;In the &lt;strong&gt;Global Cybersecurity Outlook 2026&lt;/strong&gt; report, 94 percent of respondents say AI will be the factor that changes cybersecurity the most throughout 2026.&lt;br&gt;
87 percent also say that AI-related vulnerabilities are among the fastest-growing risks.&lt;/p&gt;

&lt;p&gt;That's why it wouldn't be right to talk about &lt;strong&gt;agent security&lt;/strong&gt; as just a trend. Organizations are seeing a new attack surface.&lt;/p&gt;

&lt;p&gt;So what exactly is the problem?&lt;br&gt;
&lt;strong&gt;Prompt injection.&lt;/strong&gt;&lt;br&gt;
In other words, if a document, email or web content the model reads carries a malicious instruction, the agent processes it as if it were a harmless command.&lt;/p&gt;

&lt;p&gt;Then comes the &lt;strong&gt;data leak&lt;/strong&gt; issue. When data coming from the user and the system prompt get mixed together, sensitive information can leak out unintentionally.&lt;/p&gt;

&lt;p&gt;There's also the &lt;strong&gt;privilege&lt;/strong&gt; side. If you give file system and mail access to an agent that's only supposed to produce a summary, the chain gets unnecessarily long.&lt;br&gt;
And the longer it gets, the bigger the margin for error and the attack surface.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;OWASP Top 10 for Agentic Applications 2026&lt;/strong&gt; already names these separately.&lt;br&gt;
Headings like &lt;strong&gt;Tool Misuse, Agent Goal Hijack, Memory &amp;amp; Context Poisoning, Identity &amp;amp; Privilege Abuse&lt;/strong&gt; look a bit different from the classic web application.&lt;br&gt;
Because here the input isn't just the message the user types. An uploaded PDF is input too. JSON coming from an external tool is input too.&lt;/p&gt;

&lt;p&gt;If you see an AI agent, look at these three things first:&lt;br&gt;
&lt;strong&gt;What can it read? What can it execute? What can it send out?&lt;/strong&gt;&lt;br&gt;
The broader the answer, the bigger the risk.&lt;/p&gt;

&lt;p&gt;As for the defense side, these are the things to pay attention to:&lt;br&gt;
Least privilege.&lt;br&gt;
Logging.&lt;br&gt;
Human approval for critical operations.&lt;br&gt;
Monitoring tool calls separately.&lt;br&gt;
Running tests in places separate from real data.&lt;/p&gt;

&lt;p&gt;The model may be very smart, but a single API key connected to the wrong place can break everything.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://genai.owasp.org/resource/owasp-top-10-for-agentic-applications-for-2026/

https://reports.weforum.org/docs/WEF_Global_Cybersecurity_Outlook_2026.pdf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;em&gt;Originally written in Turkish on &lt;a href="https://eminuzun.com/blog/prompt-injectiondan-data-leake-agentic-ai-riskleri/" rel="noopener noreferrer"&gt;eminuzun.com&lt;/a&gt;. AI was used only for the translation.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>ai</category>
      <category>llm</category>
      <category>agents</category>
    </item>
    <item>
      <title>Running Linux Inside a PDF: linuxpdf</title>
      <dc:creator>Emin ÜZÜN</dc:creator>
      <pubDate>Tue, 20 Oct 2026 01:22:10 +0000</pubDate>
      <link>https://dev.to/emuzinun/running-linux-inside-a-pdf-linuxpdf-2cl2</link>
      <guid>https://dev.to/emuzinun/running-linux-inside-a-pdf-linuxpdf-2cl2</guid>
      <description>&lt;p&gt;You open a PDF in your browser, there's a terminal inside, and you can run commands.&lt;/p&gt;

&lt;p&gt;Adobe's spec supports JavaScript execution.&lt;br&gt;
If the viewer implements it, JS code embedded in a PDF can run.&lt;br&gt;
So a PDF isn't just a document; it can actually be used as a runtime environment too.&lt;br&gt;
This feature has been actively used in PDF-based attacks for years.&lt;br&gt;
linuxpdf &lt;strong&gt;exploits&lt;/strong&gt; exactly this.&lt;/p&gt;

&lt;p&gt;Ading2210 compiled the &lt;strong&gt;Linux kernel&lt;/strong&gt; to &lt;strong&gt;WebAssembly&lt;/strong&gt; using Emscripten.&lt;br&gt;
The resulting &lt;strong&gt;WASM binary&lt;/strong&gt; is embedded inside the PDF.&lt;br&gt;
When the PDF opens, the JavaScript engine runs this WASM and you see a terminal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ls, cat, echo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Commands like these work.&lt;/p&gt;

&lt;p&gt;A real shell experience.&lt;/p&gt;

&lt;p&gt;Of course, it has its limitations too. &lt;strong&gt;Not every PDF viewer can open it&lt;/strong&gt; because not all of them support JS execution.&lt;br&gt;
&lt;strong&gt;Chrome&lt;/strong&gt;'s built-in viewer &lt;strong&gt;behaves in an isolated way&lt;/strong&gt; and its WASM support isn't complete.&lt;br&gt;
&lt;strong&gt;Chromium or Firefox&lt;/strong&gt; is recommended for the demo.&lt;/p&gt;

&lt;p&gt;There's also the performance issue. Every keystroke goes through the WASM runtime, so it can't be as fast as a real terminal.&lt;/p&gt;

&lt;p&gt;From a &lt;strong&gt;security&lt;/strong&gt; perspective, what the project demonstrates matters.&lt;br&gt;
PDFs being able to run JavaScript is an old risk, but once it reaches the level of "&lt;strong&gt;a full operating system can run inside this&lt;/strong&gt;", it looks different, of course.&lt;br&gt;
In practice, it can be a good reference point for thinking about how sophisticated a malicious PDF can get.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo216smyvt7x6o1pd9alf.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo216smyvt7x6o1pd9alf.webp" alt="Linux terminal running inside a PDF"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The project's source code is available on GitHub. The demo PDF opens in the browser without downloading.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Source:&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;https://github.com/ading2210/linuxpdf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Demo:&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;https://linux.doompdf.dev/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;em&gt;Originally written in Turkish on &lt;a href="https://eminuzun.com/blog/pdf-icinde-linux-calistirmak-linuxpdf/" rel="noopener noreferrer"&gt;eminuzun.com&lt;/a&gt;. AI was used only for the translation.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>webassembly</category>
      <category>opensource</category>
      <category>javascript</category>
    </item>
    <item>
      <title>What Is XSS? The Basics and a Hands-On DVWA Demo</title>
      <dc:creator>Emin ÜZÜN</dc:creator>
      <pubDate>Tue, 20 Oct 2026 01:22:05 +0000</pubDate>
      <link>https://dev.to/emuzinun/what-is-xss-the-basics-and-a-hands-on-dvwa-demo-29fa</link>
      <guid>https://dev.to/emuzinun/what-is-xss-the-basics-and-a-hands-on-dvwa-demo-29fa</guid>
      <description>&lt;p&gt;You type your name into a website, but instead of normal text you leave a small piece of code in that box.&lt;/p&gt;

&lt;p&gt;The site doesn't notice. It prints it to the page as is. Then whoever opens that page, the code you left runs in their browser.&lt;/p&gt;

&lt;p&gt;That's XSS, in short and in its simplest form.&lt;/p&gt;

&lt;p&gt;It stands for Cross-Site Scripting.&lt;/p&gt;

&lt;p&gt;Put simply, it's a flaw that comes from a site printing user input to the screen without checking it.&lt;/p&gt;

&lt;p&gt;The attacker slips their own JavaScript in, and that code runs in someone else's browser.&lt;/p&gt;

&lt;p&gt;Why is it dangerous? Because that code can do pretty much anything. The classic scenario is stealing the user's session, in other words their cookie. A cookie is a small piece of data that tells the site "this person is already logged in." If it gets stolen, the attacker can get into your account.&lt;/p&gt;

&lt;p&gt;There are three main types.&lt;/p&gt;

&lt;p&gt;The first is &lt;strong&gt;reflected XSS.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The malicious code is sent through a link and reflected back on the page. It isn't persistent; the user has to click the link.&lt;/p&gt;

&lt;p&gt;The second is &lt;strong&gt;stored XSS.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here the code gets saved in the site's database, in a comment field for example. It runs for everyone who opens the page. The user doesn't click anything; opening the page is enough. That's why stored is usually considered more dangerous.&lt;/p&gt;

&lt;p&gt;The third is &lt;strong&gt;DOM-based.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This one is a bit different because the code never reaches the server. The page updates itself with JavaScript that's already running in your browser, for example by taking a value from the address bar and printing it to the page. When the attacker fills that value with malicious code, everything still happens in the browser and the server doesn't even know about it. In reflected and stored, the code comes back from the server; in DOM-based, it stays in the browser from start to finish.&lt;/p&gt;

&lt;p&gt;We'll see reflected and stored live, because showing the two side by side is the clearest way to explain the difference between the types.&lt;/p&gt;

&lt;p&gt;There's an app called DVWA. &lt;strong&gt;Damn Vulnerable Web Application&lt;/strong&gt; is a training app that's left vulnerable on purpose. It runs on your own computer, so you're not touching a real site. We log in as the admin user.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu17z805fttwc4zbtsagj.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu17z805fttwc4zbtsagj.webp" alt="DVWA login screen" width="666" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Inside, you can also set the security level. We pick "low" because there's no filtering at all there, which shows the flaw in its clearest form.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faeezs8j2wj9ak1rz389k.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faeezs8j2wj9ak1rz389k.webp" alt="DVWA security level set to low" width="800" height="694"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's start with reflected. The DVWA menu has an "XSS (Reflected)" page. There's a box on the screen that says "What's your name?" Normally you type your name and the site says "Hello CWSpeciaL."&lt;/p&gt;

&lt;p&gt;Instead of a name, we type this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;alert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;XSS&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&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/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhg5c0abtrgwxcawj8vwr.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhg5c0abtrgwxcawj8vwr.webp" alt="Entering the reflected payload" width="800" height="476"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The site doesn't check whether this text is dangerous. It prints it to the page. The browser sees it as code, not text, and runs it. A small alert box pops up on the screen.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5xrgzijod63qxjtn98go.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5xrgzijod63qxjtn98go.webp" alt="The reflected alert ran" width="478" height="207"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That box means "code can be injected here." Why does it work? Look at the page source and you'll see it. The script tag we typed is embedded in the page's HTML exactly as we wrote it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9s8nm71vmpgo8sezjuer.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9s8nm71vmpgo8sezjuer.webp" alt="The script embedded in the HTML source" width="429" height="191"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The alert is harmless; it's just proof. But real malicious code could go in the same place. Say we type this into the name box:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;alert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;cookie&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This time the box shows the session data. If an attacker sent this to their own server instead of printing it on screen, they would have stolen your session.&lt;/p&gt;

&lt;p&gt;Now let's move on to stored, because this is the really dangerous one.&lt;/p&gt;

&lt;p&gt;The "XSS (Stored)" page has a guestbook. You enter a name and a message, and they get saved. We put the cookie payload in the message box.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fys7jl69v6kc4h309amgc.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fys7jl69v6kc4h309amgc.webp" alt="Entering the stored payload" width="799" height="481"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We hit save. Here's the difference: the code now lives in the database. We close the page and open it again.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffwe7svvb26owtp4hfh16.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffwe7svvb26owtp4hfh16.webp" alt="Stored persistence: the alert ran again" width="800" height="548"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It runs again, and the cookie is on the screen again. Nobody clicked a link, nobody typed anything. It fires automatically for everyone who opens the page. That's exactly the difference between reflected and stored.&lt;/p&gt;

&lt;p&gt;So how does a developer prevent this? The basic rule is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Never trust any data that comes from the user.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Apply output encoding before printing anything to the screen. That means turning the &lt;code&gt;&amp;lt;&lt;/code&gt; character into a form like &lt;code&gt;&amp;amp;lt;&lt;/code&gt; that looks the same but doesn't run. The browser then treats it as plain text, not code. In fact, when you set DVWA to "medium" or "high", these filters kick in and the payload stops working.&lt;/p&gt;

&lt;p&gt;There's also a shield called &lt;strong&gt;Content Security Policy (CSP).&lt;/strong&gt; It lets the site say "only run scripts from these sources." Code that gets slipped in runs into that rule.&lt;/p&gt;

&lt;p&gt;XSS is an old flaw, but it's still on the OWASP lists. The reason is simple: every new form and every new comment box is a potential entry point. A single unfiltered field is enough.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://owasp.org/www-community/attacks/xss/
https://portswigger.net/web-security/cross-site-scripting
https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;em&gt;Originally written in Turkish on &lt;a href="https://eminuzun.com/blog/xss-nedir-temel-anlatim/" rel="noopener noreferrer"&gt;eminuzun.com&lt;/a&gt;. AI was used only for the translation.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
