split secutils from mitm.js to facilitate merge back of service changes