Exploiting port 3000,5000,9000 and 1000000

Hi everyone,
Could someone please explain to me how to exploit a website that is running on port 3000, 9000, 5000, or 10000.

eg: - http://localhost:3000/ or
http://localhost:5000/

An exploit has nothing directly to do with the port.