When I did a port scan
nmap -p- localhost of my local system I found some unknown ports opened. I was using a closed source application when this happened and I known its this causing port opening. Everytime I open this software it uses a different port.
To find the process associated with the port I used
sudo lsof -i TCP:48292
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME somefunc 12819 eka 3u IPv4 2132143 0t0 TCP localhost:48292 (LISTEN)
This closed source software is always using
somefunc command to open random ports on everyrun.
How can I block this command from opening any more ports?
Edit: Its confirmed this closed source software is running
somefunc. I found the source directory using