Well, any language really.
The hard part though, isn't programming the language, its monitering both program control and packets sent and recieved via TCP/UDP. You would have to determine what packets are harmful, and what are not, and you would need to know what sort of access different programs want, as well as what actions performed by certain programs are considered dangerous ...
All-in-all, this DEFINITELY isn't a one-man job I'm affraid.
C/C++/ASM is your best bet.
And no, you don't hardcode it in ASM, you debug it in ASM.