Giter Site home page Giter Site logo

gmh5225 / edr-testing-nowatch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zimnyaa/nowatch

0.0 1.0 0.0 682 KB

Implant drop-in for EDR testing

Home Page: https://tishina.in/opsec/nowatch-prealpha-release

License: MIT License

C++ 0.68% Python 35.15% C 44.97% Java 6.64% C# 4.42% Nim 7.74% Makefile 0.41%

edr-testing-nowatch's Introduction

noWatch


https://tishina.in/execution/nowatch-prealpha-release noWatch is an interactive console application that allows tampering with EDR userland hooks and testing EDR detection capabilities. It is meant to be used as a standalone binary or converted with donut and remotely injected. In general, it is designed as a drop-in replacement for testing what C2 framework features can get detected without deploying C2 in an Internet-isolated detection lab. Usage demo:


nowatch_0 0 1

noWatch capabilities are divided into discovery commands and attacks. Discovery commands are simple and few:

         modname -> find module name for address (discovery)
          showrx -> show rx pages in the current process (discovery)
             set -> set runtime config (util)
        jmphooks -> show jmp instructions at the beginning of all functions in the current library (discovery)
      disas_addr -> disassemble @address (discovery)
      showconfig -> show runtime config (util)
         refresh -> reload .text of the currentlibrary from disk (evasion)
        listdlls -> list running DLLs in the current process (discovery)
           disas -> disassemble a function in the current library (discovery)
    virtualquery -> show all vmemory pages (discovery)
         showrwx -> show rwx pages in the current process (discovery)
            help -> show help (util)

Attacks are pretty simple, as they are meant to test various malicious activity primitives:

     crt_inject -> execute msgbox remotely with CreateRemoteThread
         loadclr -> load a demo C# assembly to the process
         loadpsh -> execute psh with System.Management.Automation
           spawn -> calls startprocess
         dropdll -> drop a stub dll to disk
            exec -> calls execCmd
        patchetw -> patch EtwEventWrite with a single RET (evasion)
             iwr -> fetches a URL (http only), prints first 200 chars
    local_inject -> execute msgbox locally
       patchamsi -> patch AMSI (evasion)
     impersonate -> calls ImpersonateLoggedOnUser on pid
      whoami_bof -> calls whoami.o BOF (for testing COFFLoading)
      unhook_bof -> calls unhook.o BOF (as another unhooking method)
      ppid_spoof -> create suspended notepad process with PPID spoofing to explorer

dependencies&building

$ nimble install winim ptr_math memlib

  • Distorm3 from nimble is also used, but it had to be patched, so it's shipped here as well. In general, disassembly in noWatch is really bad and unreliable, so use a proper debugger if you can.
$ nim c --threads:on --passL:"-static-libgcc -static -lpthread" --app:gui --threadAnalysis:off .\main.nim
$ nim c --nomain --app:lib -o:.\resources\stub.dll .\resources\stub.nim

For injection, you'll need to compile the executable with a relocation table with --passL:-Wl,--dynamicbase.

credits and offensive Nim resources

edr-testing-nowatch's People

Contributors

zimnyaa avatar

Watchers

 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.