突破与侦察:Strat Jumbo网络渗透全解析
1. 构建交互式PowerShell控制台
在突破AppLocker限制并尝试构建交互式PowerShell控制台的过程中,我们需要进行一系列的代码调整。首先,是 executeHelper 方法的伪实现:
private void executeHelper(string cmd, object input){
lock (this.instanceLock){
this.currentPowerShell = PowerShell.Create();
}
this.currentPowerShell.AddScript(cmd);
// --snip--
}
为了调用 PSListenerConsoleSample 类,我们将其复制粘贴到 PsCommand 类之后,并将其设为公共类以暴露其方法。以下是相关代码结构:
public class PsCommand : Task, ITask {
public override bool Execute() {
// Our previous C# code
return true;
}
}
public class PSListenerConsoleSample {
// --snip--
// Microsoft code to have an interactive
超级会员免费看
订阅专栏 解锁全文
924

被折叠的 条评论
为什么被折叠?



