GithubHelp home page GithubHelp logo

ivan-sincek / memory-dumper Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 2.0 295 KB

Dump a process memory and extract data based on regular expressions.

License: MIT License

C++ 100.00%
c-plus-plus defensive-security ethical-hacking incident-response security windows computer-forensics threat-hunting bug-bounty dump-memory

memory-dumper's Introduction

Memory Dumper

Dump a process memory and extract data based on regular expressions. Tool uses multithreading.

Dump and inspect a process memory:

  • during inactivity in an application,
  • after locking an application,
  • after logging out from an application.

Garbage cleaners might not free the unused memory immediately, but should do so after 5-10 minutes after the last action.

CPU and RAM consumption, as well as duration heavily depends on:

  • number of memory dump files,
  • size of each memory dump file,
  • number of regular expressions and their complexity.
  • occurrence of each regular expression.

Built with Visual Studio Community 2019 v16.10.2 (64-bit) and tested on Windows 10 Enterprise OS (64-bit).

Made for educational purposes. I hope it will help!

Table of Contents

How to Run

Run MemoryDumper_x86.exe (32-bit) or MemoryDumper_x64.exe (64-bit).

Check the example file with regular expressions here.

Manual Memory Dumping

To manually dump a process memory, open Task Manager -> right click on the desired process -> click on Create dump file.

Manual Memory Inspection

The following was tested on Kali Linux v2023.1 (64-bit).

Install the required tools on your Kali Linux:

apt-get -y install strings radare2 grep

I prefer using rabin2 over strings.

rabin2

Inspect memory dump, binary, executable, or any other files:

rabin2 -zzzqq somefile | grep -Pi '(keyword-1|keyword-2|keyword-3)'

rabin2 -zzzqq somefile | sort -uf > strings.txt

Automate file inspection from the current directory:

IFS=$'\n'; for file in $(find . -type f); do echo -n "\nFILE: \"${file}\"\n"; rabin2 -zzzqq "${file}" 2>/dev/null | grep -Pi '(keyword-1|keyword-2|keyword-3)'; done

IFS=$'\n'; for file in $(find . -type f); do rabin2 -zzzqq "${file}" 2>/dev/null; done | sort -uf > strings.txt

strings

Inspect memory dump, binary, executable, or any other files:

strings somefile | grep -Pi '(keyword-1|keyword-2|keyword-3)'

strings somefile | sort -uf > strings.txt

Automate file inspection from the current directory:

IFS=$'\n'; for file in $(find . -type f); do echo -n "\nFILE: \"${file}\"\n"; strings "${file}" 2>/dev/null | grep -Pi '(keyword-1|keyword-2|keyword-3)'; done

IFS=$'\n'; for file in $(find . -type f); do strings "${file}" 2>/dev/null; done | sort -uf > strings.txt

Images

Run

Figure 1 - Run

memory-dumper's People

Contributors

ivan-sincek avatar

Stargazers

 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.