I want to run a powershell command like get-domaincomputer, capture the output, so I can parse the hosts and add them to Cobalt Strike's using the hosts_update API call.
It seems like it sould be pretty easy, but, so far, I've I haven't found a way to do it.
I thought maybe I could create a callback and pass it in bpowershell, via an alias command call, but the callback is auto registered, but never called because the 'name' is set to 'return' after the alias callback is run.
So, far it seems like only official Cobalt Script functions, expecting a call back will accept a callback. (which makes sense).
I would greatly appreciate any advice you may have on the subject,
Thanks!
I want to run a powershell command like
get-domaincomputer, capture the output, so I can parse the hosts and add them to Cobalt Strike's using the hosts_update API call.It seems like it sould be pretty easy, but, so far, I've I haven't found a way to do it.
I thought maybe I could create a
callbackand pass it inbpowershell, via analiascommand call, but the callback is auto registered, but never called because the 'name' is set to 'return' after thealiascallback is run.So, far it seems like only official Cobalt Script functions, expecting a call back will accept a callback. (which makes sense).
I would greatly appreciate any advice you may have on the subject,
Thanks!