Giter Site home page Giter Site logo

atlasldr's Introduction

Atlas is a reflective x64 loader that has the following features:

Features

  • Retrieve of DLL and PE from a remote server
  • Manual Mapping on a remote process
  • Erase of the DOS Header and NTHeader Magic bytes
  • Position independent code
  • Use of indirect Syscalls
    • ZwOpenProcess
    • ZwAllocateVirtualMemory
    • ZwProtectVirtualMemory
    • ZwQuerySystemInformation
    • ZwFreeVirtualMemory
    • ZwCreateThreadEx
  • Single stub for all Syscalls
    • Dynamic SSN retrieve
    • Dynamic Syscall address resolution
  • Atlas also uses
    • LdrLoadDll
    • NtWriteVirtualMemory
  • Custom implementations of
    • GetProcAddress
    • GetModuleHandle
  • API hashing
  • Cleanup on error
  • Optional cleanup on finish
  • Variable EntryPoint

Usage

Atlas requires the following parameters to work properly:

Usage: atlas_x64.exe [Process name / PID] [Cleanup] [Server] [Port] [AtlasPatcher DLL] [DLL/PE to inject] <Entrypoint>
Parameter Description
Name / PID The name or PID of the target process
Cleanup Indicate whether you want to remove the injected DLLs from the target process upon completion (Cleanup supports 1 or 0 as values)
Server The IP address of the remote server where you have the DLLs
Port The port used by your server
AtlasPatcher DLL The name of the AtlasPatcher DLL (by default atlas_patcher.dll) hosted on your server (you can find the DLL under /AtlasLdr/bin once compiled)
DLL/PE to inject The name of the DLL or PE you want to inject, hosted on your server
Entrypoint An optional argument; the name of the exported function you want to use as entrypoint when the DLL is injected

AtlasLdr

The Atlas approach

The conventional approach to a loader usually involves having an injector responsible for injecting a DLL containing the loader into the remote process we are targeting. Once injected, execution is passed to the loader, which is responsible for mapping the malicious DLL. In contrast, Atlas takes a slightly different approach by performing the entire mapping process within its own context, except for the Import Address Table (IAT) patching, which is deferred.

Once the malicious DLL has been mapped into the Atlas context, it is copied into memory previously reserved in the remote process. At this point, the malicious DLL is mapped into the remote process, but the IAT has not been patched. To fix this, AtlasLdr injects a DLL (atlas_patcher.dll) into the malicious process with minimal dependencies, which takes care of patching the IAT of the malicious DLL and then transfers the execution context to it.

This approach helps reduce the size and complexity of the loader DLL to be injected into the remote process and minimises the chances of the injector being detected, as we can load the DLL with the loader itself.

Compilation

Atlas needs to be compiled using x86_64-w64-mingw32-g++, once you have it on your system, just execute make (or mingw32-make.exe) on the project folder

AtlasCompilation

atlasldr's People

Contributors

krypteria 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.