Edit netstat and ss to prevent show connections on certain ports

I am working on a PoC and I am currently adding APT. I would like to know if anyone knows any source code where netstat and/or ss tools are modified to not show connections on certain ports.