how to find xss bug

hackersque
3 min readNov 3, 2020

what is xss

Cross-Site Scripting (XSS) attacks are a blazon of injection, in which awful scripts are injected into contrarily amiable and trusted websites. XSS attacks action back an antagonist uses a web appliance to accelerate awful code, about in the anatomy of a browser ancillary script, to a altered end user. Flaws that acquiesce these attacks to accomplish are absolutely boundless and action anywhere a web appliance uses ascribe from a user aural the achievement it generates after acceptance or encoding it.

An antagonist can use XSS to accelerate a awful calligraphy to an biting user. The end user’s browser has no way to apperceive that the calligraphy should not be trusted, and will assassinate the script. Because it thinks the calligraphy came from a trusted source, the awful calligraphy can admission any cookies, affair tokens, or added acute advice retained by the browser and acclimated with that site. These scripts can alike carbon the agreeable of the HTML page

Stored XSS Attacks

Stored attacks are those area the injected calligraphy is assuredly stored on the ambition servers, such as in a database, in a bulletin forum, company log, animadversion field, etc. The victim again retrieves the awful calligraphy from the server back it requests the stored information. Stored XSS is additionally sometimes referred to as Persistent or Type-I XSS.

Reflected XSS Attacks

Reflected attacks are those area the injected calligraphy is reflected off the web server, such as in an absurdity message, chase result, or any added acknowledgment that includes some or all of the ascribe beatific to the server as allotment of the request. Reflected attacks are delivered to victims via addition route, such as in an e-mail message, or on some added website. When a user is tricked into beat on a awful link, appointment a distinctively crafted form, or alike aloof browsing to a awful site, the injected cipher campaign to the accessible web site, which reflects the advance aback to the user’s browser. The browser again executes the cipher because it came from a “trusted” server. Reflected XSS is additionally sometimes referred to as Non-Persistent or Type-II XSS.

how to find this bug

1.visit your target website

2.search for where you can input value ex:search box

3.enter any xss payload but this is the simple xss payload

payload = “><img src=x onerror=alert(document.cookie)>

4.if you see the code execute and show you the cookie you can report it to the website owner or security team

warning:this bug is very dangerous if find it please report it dont miss use

Originally published at https://hackerque.blogspot.com on November 3, 2020.

--

--