Giter Site home page Giter Site logo

nikj-fr / process-herpaderping Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 1.12 MB

My own implementation of the process herpaderping evasion technique

License: MIT License

C++ 75.10% C 24.17% CMake 0.37% Batchfile 0.35%
windows security exploit vulnerability antivirus-evasion process-herpaderping winapi cpp

process-herpaderping's Introduction

💉 Process-Herpaderping 💉

My own implementation of the process herpaderping evasion technique discovered by Johnny Shaw. Also, I provide a solution to detect this attack.

Summary

What is Process Herpaderping ?

Process Herpaderping is a technique used to evade Antivirus solution by modifying the content on disk after the image file has been mapped.

These are the steps to achieve this attack:

  • Read the Payload Binary (CreateFile)
  • Create the target file on disk, keep the handle open. We will execute it later in memory (CreateFile)
  • Map the target file as an image (NtCreateSection)
  • Write random data on the target file handle (GetFileSize, SetFilePointer, ...)
  • Create the thread of the target file (NtCreateThreadEx)
  • Wait for the process to execute ...
  • Close the handle

Demonstration

demonstration_process_herpaderping.mp4

Getting Started

Prerequisite

Clone

Clone the repository, then fetch and update all the submodules

$ git clone https://github.com/Nikj-Fr/Process-Herpaderping.git
$ cd .\Process-Herpaderping
$ git submodule update --init --recursive

Project Setup

Here are all the configuration I made to my Visual Studio project

  • Include Folder within Visual Studio must look to find librairies project_setup_include_directory

  • Setup the precompiled header file project_setup_precompiled_header

  • List of the project dependencies (.lib to include) project_setup_dependencies

bcrypt.lib
ntdll.lib
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
comdlg32.lib
advapi32.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
odbc32.lib
odbccp32.lib
  • Compiled Architecture As a development infrastructure I used the x64-Debug profile of Visual Studio project_setup_architecture

Start the executable

# After a sucessfull compilation..
$ cd .\Process-Herpaderping\Herpaderping\x64\Debug
$ Herpaderping.exe [PayloadFile] [TargetFile]

Détection

PI-Defender

Kernel Security driver used to block past, current and future process injection techniques on Windows Operating System. Link to the repository.

detection_pi-defender.mp4

Credits

The following have been used without modification:

I used the Utilitaire.cpp (with some modification but..) and pch.hpp from:

process-herpaderping's People

Contributors

nikj-fr avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

avkudinov

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.