ADVANCED XSS AND CSRF EXPLOITATION - vHosts

How should i write the hots file to add the domains listed on the lab warmup module
vHosts needed for these questions:

  • exfiltrate.htb
  • exploitserver.htb
  • xss.vulnerablesite.htb
  • csrf.vulnerablesite.htb

im trying to figure out the same thing any luck yet

no sorry :(, do you have any luck?

You need to add them to your /etc/hosts file. You’ll need to know this for a lot of the HTB challenges and modules. This command will append the line to your /etc/hosts file (do not overwrite the file completely). You can also manually add them.

echo “10.10.10.10 exfiltrate.htb exploitserver.htb xss.vulnerablesite.htb csrf.vulnerablesite.htb” >> /etc/hosts

You will need to change the IP to whatever IP the lab machine spawns with.

yeah i been doing it for a lot of hack the box machines, but its not working right now i dont know why

here is a pic

You need to also add the port after the IP. Example (replace 10101 with whatever port your box spawns with):

http://exfiltrate.htb:10101