Giter VIP home page Giter VIP logo

doubleagent's Introduction

DoubleAgent

DoubleAgent is a new Zero-Day technique for injecting code and maintaining persistence on a machine (i.e. auto-run).

DoubleAgent can exploit:

  • Every Windows version (Windows XP to Windows 10)
  • Every Windows architecture (x86 and x64)
  • Every Windows user (SYSTEM/Admin/etc.)
  • Every target process, including privileged processes (OS/Antivirus/etc.)

DoubleAgent exploits a 15 years old legitimate feature of Windows and therefore cannot be patched.

Code Injection

DoubleAgent gives the attacker the ability to inject any DLL into any process. The code injection occurs extremely early during the victim’s process boot, giving the attacker full control over the process and no way for the process to protect itself. The code injection technique is so unique that it’s not detected or blocked by any antivirus.

Persistency

DoubleAgent can continue injecting code even after reboot making it a perfect persistence technique to “survive” reboots/updates/reinstalls/patches/etc. Once the attacker decides to inject a DLL into a process, they are forcefully bounded forever. Even if the victim would completely uninstall and reinstall its program, the attacker’s DLL would still be injected every time the process executes.

Attack Vectors

  • Attacking Antivirus & Next Generation Antivirus – Taking full control of any antivirus by injecting code into it while bypassing all of its self-protection mechanism. The attack has been verified and works on all the major antiviruses including but not limited to: Avast, AVG, Avira, Bitdefender, Comodo, ESET, F-Secure, Kaspersky, Malwarebytes, McAfee, Norton, Panda, Quick Heal and Trend Micro. For more details, checkout our Taking Full Control Over Your Antivirus article.

  • Installing Persistent Malware – Installing malware that can “survive” reboots and are automatically executed once the operating system boots.

  • Hijacking Permissions – Hijacking the permissions of an existing trusted process to perform malicious operations in disguise of the trusted process. e.g. Exfiltrating data, C&C communication, lateral movement, stealing and encrypting sensitive data.

  • Altering Process Behavior – Modifying the behavior of the process. e.g. Installing backdoors, weakening encryption algorithms, etc.

  • Attacking Other Users/Sessions – Injecting code to processes of other users/sessions (SYSTEM/Admin/etc.).

Technical Deep Dive

For more details, checkout our technical article.

Installation

  1. Clone/Download the DoubleAgent source code.
  2. Build the main solution twice, once in x86 and once in x64. This step is crucial as it creates both x86 and x64 versions of DoubleAgentDll.dll which is required in order to perform a successful installation.
  3. Copy the entire bin folder to the target machine.
  4. Execute the installer:
    Usage:  DoubleAgent.exe install\uninstall\repair process_name
    
    e.g.    DoubleAgent.exe install cmd.exe
    
    Note that the 32bit installer (DoubleAgent_x86.exe) can be used both on Windows x86 and Windows x64. But the 64bit installer (DoubleAgent_x64.exe) can be used only on Windows x64.
  5. The next time the target process loads DoubleAgentDll.dll would be injected into it.

Authors

Cybellum Technologies LTD (http://cybellum.com/)

doubleagent's People

Contributors

bawaaaaah avatar michaelengstlercb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

doubleagent's Issues

Unresolved External Symbols when trying to use stdio.h functions.

Im using VS2017, plattform toolset 141, and im getting:

LNK2001 unresolved external symbol ___acrt_iob_func DoubleAgentDll
&
LNK2001 unresolved external symbol ___stdio_common_vfwprintf DoubleAgentDll

when trying to use (VOID)wprintf(); or any other print function after including stdio.h in the DoubleAgentDll.

The usage

would you like lease tell me how to use it?....actually i installed and i don't know whats next step i should do ..please help me>>

no x86 compiled

i build a solution using VS 2017, but no x86 build just x64 and i ran build solution two times as stated in your README.md

even when testing DoubleAgent_x64.exe on windows 10 i got Failed (error code 13)

am i doing something wrong at a point?

How to remove all the dependency libraries

What are the exact step by step to remove the dependency libraries? I could not make it work on windows 7. I know that you have to remove the dependency libraries but how exactly will I remove it?

Sample code on DoubleAgentDLL -> main.c

Hi, i compiled the solution successfully until i uncomment the sample code to launch cmd.exe in DoubleAgentDll - main.c .
goto lbl_cleanup; doesn't work as lbl_cleanup is not defined label. On the other hand, if i comment this line and compile, it seems that after launching DoubleAgent_x86.exe and then lauching manually the victim program, cmd.exe doesn't start :/
I am using a windows 7-32bits VM and Visual Studio Pro 2013.
Am i doing something wrong ?
Thanks ;)

How to compile these codes.

I'm trying to compile for exe, but whenever I try it's occur error. can you tell me how can compile correctly.

Error when testing on Win7 64bit

Tested working fine on Win10 64 bit (Both the 32 bit and 64 bit release works fine)
However i get the following error when launching the "installed" process on a Win7 64 bit VM box.
This is with the running the example code included (Launching CMD)

http://vvcap.com/lEvDaIRVdco

Application Crash on Injection

Injection of the compiled DLL fails. The injected application crashes and recovery is not possible. The crash occurs before DLLMain is called. This occurs for all Non-AppVerifier DLLs.

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.