<?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 Ksavbro on Medium]]></title>
        <description><![CDATA[Stories by Ksavbro on Medium]]></description>
        <link>https://medium.com/@nepalikeshav67?source=rss-ed74fce30cac------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*K6bIBGv52SWq89c2zId-2g.jpeg</url>
            <title>Stories by Ksavbro on Medium</title>
            <link>https://medium.com/@nepalikeshav67?source=rss-ed74fce30cac------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 20:42:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nepalikeshav67/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[Reflected Cross-Site Scripting]]></title>
            <link>https://medium.com/@nepalikeshav67/reflected-cross-site-scripting-3e68327bc7f5?source=rss-ed74fce30cac------2</link>
            <guid isPermaLink="false">https://medium.com/p/3e68327bc7f5</guid>
            <dc:creator><![CDATA[Ksavbro]]></dc:creator>
            <pubDate>Mon, 30 Jan 2023 17:17:37 GMT</pubDate>
            <atom:updated>2023-01-31T07:07:01.160Z</atom:updated>
            <content:encoded><![CDATA[<p>Before diving into the reflected XSS and how it works, let’s have some basic knowledge about cross-site scripting.</p><blockquote>So what is Cross-Site Scripting?</blockquote><blockquote>Cross-Site Scripting, generally known as XXS is a web security vulnerability which happens whenever an application takes untrusted data and sends it to the client (browser) without validation. This allows an attacker to execute malicious script on the victim’s browser which can result user session hijacking, defacement of website, etc. Basically, there are three types of XSS which has been listed below.</blockquote><ol><li>Reflected XSS: <em>Executing of malicious script through the http request to server</em></li><li>Stored XSS: <em>Executing of malicious query through the database of website</em></li><li>DOM XSS: <em>Executing of malicious query through the DOM i.e. client side injection without reaching out the server-side</em></li></ol><p>As our main topic is focused on Reflected Cross-Site Scripting, we are diving into it.</p><blockquote><strong>Reflected Cross-Site Scripting</strong></blockquote><blockquote>This vulnerability is as similar as it is named “reflected”. This vulnerability arise when the web application is reflecting any response from the server to the request i.e. error or any results immediately.</blockquote><p>Now let’s explore a basic demonstration of basic reflected cross-site scripting.</p><blockquote><strong>Demonstration</strong></blockquote><p>For this demonstration purpose, we have a web page where simply any query can be searched through an input field more like a search engine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*Hg1rOsnDHCo3dwQzdruFqQ.png" /><figcaption>Simple Webpage</figcaption></figure><p>So, let us see how this search engine works. To find how it works let&#39;s give any input and search for the query.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/1*7Hdc3jdmPrKrH44NxzHPzg.png" /><figcaption>Response from the server</figcaption></figure><p>So, what is found is, the query we search if we search for actual requests to the server and return the response from the server according to the request that we send. Another thing we discovered is that the query we had searched for has been reflected in us.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*snqCeEIDEFyUBcMLTobGQQ.png" /><figcaption>Reflecting query value</figcaption></figure><p>In short, the value hello hits the server, the server generates a page and inside the page recently developed, the server put the word hello which we had provided. Another thing we can notice is the value we searched has appeared in the URL as above.</p><blockquote>Now the question is how XSS can be reflect in this website??</blockquote><p>As I already mentioned how reflected XSS can be triggered, let’s just related that in this vulnerable webpage. As, we have noticed that the webpage has been reflecting the response of our given input immediately either by throwing an error or reflecting it on the url, it can through a reflected XSS.</p><p>To see let’s try to inject a script which will throw us an alert to the input query of the webpage and see the results.</p><pre>&lt;script&gt;alert(&quot;XSS&quot;)&lt;/script&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*GnRFIKSJ51fhP153xuVNyA.png" /><figcaption>Injecting the script for alert</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*_GAcl5OKJOvaIjI8JQxHlg.png" /><figcaption>Reflecting of XSS</figcaption></figure><p>We can even see inspect and see the script has been injected in the code which results to generate an alert.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*X-7EgOp31oUwL8B_qaDTEQ.png" /><figcaption>Analysis by inspecting the webpage</figcaption></figure><blockquote>How to protect XSS?</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FRD-DCjD7WW2Zb3I" /></figure><ol><li>Input field must be strictly filtered and sanitize on the basis of valid and appropriate input according to the field.</li><li><em>Content type </em>and <em>X-content-type-options </em>header must be implement which prevent XSS in HTTP response which should not content any HTML or Javascript while interpreting on browser.</li><li>User should be aware of unusual links or URLs which contains malicious code.</li><li>Last but not least, use of content security policy (CSP) an also reduce the danger of XSS vulnerabilities.</li></ol><blockquote>This much for this article. I will be back with other XSS type and their demostration in my next blog. You can get the demonstrated lab used in this article from the links below. Do check the lab and try it by yourselves too.</blockquote><p><a href="http://xss-game.appspot.com/level1">http://xss-game.appspot.com/level1</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3e68327bc7f5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Analysis With Wireshark [Activity]]]></title>
            <link>https://medium.com/@nepalikeshav67/analysis-with-wireshark-activity-386204a4f528?source=rss-ed74fce30cac------2</link>
            <guid isPermaLink="false">https://medium.com/p/386204a4f528</guid>
            <dc:creator><![CDATA[Ksavbro]]></dc:creator>
            <pubDate>Wed, 14 Dec 2022 07:38:20 GMT</pubDate>
            <atom:updated>2022-12-14T07:38:20.344Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Analysis With Wireshark [Activity]</strong></p><p><strong>PCAP 1</strong></p><ol><li><strong>Which protocol was used over port 3942?</strong></li></ol><blockquote>For this question you have to follow the following procedure.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*vrhd2VJnaDR1jHIhyyDi_g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*MiNxWn8gRJV-x3alRnD04Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*6cg-Zy94KjIz0glo9HHesg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*PZoF0EJSgd32fRxmT8tj0g.png" /></figure><blockquote><em>And here we finally got the service which is SSDP running on port 3942.</em></blockquote><p><em>2.What is the IP address of the host that was pinged twice?</em></p><blockquote>Enter icmp in the filter and see.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3dy6zGum57bOee9gDeJd0w.png" /></figure><blockquote>192.168.1.7 pinged 8.8.8.8 twice. So answer is 8.8.8.8.</blockquote><p><strong>3.How many DNS query response packets were captured?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OQ4VPvIEVd8m-Xn62Q5BDg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sSOiyDoHyi4l-Hjr8FfsHA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SYqSh0qrSStJghNj1Iyv-A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a-JZlxfLYwRn4MifmNXzVw.png" /></figure><blockquote><em>By the above step we can found the response packets i.e. 90</em></blockquote><p><strong>4.What is the IP address of the host which sent the most number of bytes?</strong></p><p><em>-&gt; [Statistic&gt;Endpoints&gt;IPv4&gt;TxBytes] in wireshark.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZWOlQKI6uXFMvCKa6QUP2A.png" /></figure><p><strong>PCAP 2</strong><br><strong>1.What is the WebAdmin password?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8P9UEMQt9_XnKVJjRNboQA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/1*WvOa4uJAJD7JAZooqLQpjg.png" /></figure><blockquote>Here we got the password. Or you<em> </em>can just search for the string WebAdmin at <strong>Edit&gt;Find Packet or Cntrl+F</strong></blockquote><p><strong>2.What is the version number of the attacker’s FTP server?</strong></p><blockquote><em>Search for the ftp packets and go see for the ftp at bottom where you can found it.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XHIPS2OpJfRXVKSYRk1c4g.png" /></figure><p><strong>3.Which port was used to gain access to the victim Windows host?</strong></p><blockquote>I searched for login string and saw the ACK packet before the login. Then found the port 8081.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j8w8H5utW_RrVTLE9pJGJA.png" /></figure><p><strong>4.What is the name of a confidential file on the Windows host?</strong></p><blockquote>I followed the same packet where I got the port 8081 and found it.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IsQX6Re2G6Tg_J_nig1MlA.png" /></figure><p><strong>5.What is the name of the log file that was created at 4:51 AM on the Windows host?</strong></p><blockquote>In the same packet followed search for the time 4:51 and you’ll got it.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*9jJD88Zu4Tz_A6FyG2B-2A.png" /></figure><p><strong>Source of pcap:</strong><a href="https://elearning.securityblue.team/home/courses/free-courses/introduction-to-network-analysis#content#analysis-with-wireshark#introduction-to-wireshark#activity-wireshark-challenge"> https://elearning.securityblue.team/home/courses/free-courses/introduction-to-network-analysis#content#analysis-with-wireshark#introduction-to-wireshark#activity-wireshark-challenge</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=386204a4f528" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>