Git Product home page Git Product logo

win-loadlibrary's Introduction

Win LoadLibary

A simple program to load DLL and call exported functions

I got interested into c++ after watching Pavel sir courses and reading books written by him on system programming. So I decided to explore this on my own and implement DLL rather than using static library

NOTE: Although I don't like windows for usage, but I use it for learning exploitation and learning about malwares.

How DLL is used

  1. Create a DLL project (MyDLL)
  2. If you want to execute some code on load, use DllMain function already scaffolded, otherwise create functions
  3. Load the library using LoadLibrary or LoadLibrayA function
  4. Create cast types for function defined in dllmain.cpp (MyDLL/Header.h)
  5. Use the GetProcAddress function to find address of the target function from the loaded dll
  6. Type cast the FARPROC to the typedef from the header file
  7. Call the returned function object which has actual reference for executing code
  8. Free the library using FreeLibrary function

Program Usage

Open the code in visual studio and build both the projects for x86 or x64 (recommended) architecture and run the program as shown below

usage: DLLLoad.exe <x> <y> <add|div|prod|sub>

References

Contact Me

Linkedin: @tbhaxor
Twitter: @tbhaxor
Email: tbhaxor dot proton dot me

win-loadlibrary's People

Contributors

tbhaxor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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