Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External URL in XSS test cases #10

Closed
phra opened this issue Feb 11, 2021 · 1 comment
Closed

External URL in XSS test cases #10

phra opened this issue Feb 11, 2021 · 1 comment

Comments

@phra
Copy link

phra commented Feb 11, 2021

In order to test for XSS vulnerabilities via an Electron application running locally, this project should not use external, out of end-user control XSS payloads hosted on third-party services such as the one present in xss.html.

var ujs1 = `///xsstron.herokuapp.com/x.php`

var ujs1 = `///qrsha.000webhostapp.com/xsstron.php`

@RenwaX23
Copy link
Owner

I control this domains and there isn't any thing to worry about you can change them to your URL, source code of the file is:

<?php

header("Content-Type: application/javascript");
function cors() {
    
    if (isset($_SERVER['HTTP_ORIGIN'])) {

        header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}");
        header('Access-Control-Allow-Credentials: true');
    }
    
    if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
        
        if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD']))
            header("Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE");         
        
        if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']))
            header("Access-Control-Allow-Headers: {$_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']}");
    
        exit(0);
    }
    
    echo "javascript:top.pinghost(1)//<img src=x onerror=top.pinghost(1)>";
}

cors();
?>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants