GithubHelp home page GithubHelp logo

raystyle / proctools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mlcsec/proctools

0.0 0.0 0.0 41 KB

Small toolkit for extracting information and dumping sensitive strings from Windows processes

C++ 16.67% C 73.61% C# 9.73%

proctools's Introduction

proctools

Small toolkit for extracting information and dumping sensitive strings from Windows processes . Made to accompany another project that's in the works.

  • procsearch - find sensitive strings in target process memory
    • searches for parsed string in readable process memory, if found, displays a range of valid ASCII chars around the search string
  • procinfo - display the following file version information for the process executable:
    • process name
    • description
    • product name
    • file version
    • internal name
    • company name
    • comments
    • legal copyright
    • legal trademarks
    • product version
    • private build
    • special build
  • procargs - extract command line arguments for target process
  • prockill - terminate target process

procsearch.cpp

Dump process memory and search for readable strings. PID, search string, and range supplied only for this version. When the search string is found, the range parameter indicates how many characters each side of the found string should be printed as long as they're valid ASCII.

Compile in VS. Example below dumping user information from Outlook process:

PS C:\Users\capde> .\procsearch.exe 7592 "email" 500

[+] Search string "email" FOUND: (...) "age_group": "adult",  "association_status": "{\"com.microsoft.Olk\":\"associated\"}"
,"authority": "https://login.microsoftonline.com/consumers",  "birthday": "1969-3-1",  "display_name": "John Doe",
"email": "[email protected]",  "first_name": "John",  "id": "3a25f54136ac887c",  "last_name": "Doe",  "location":
"UK",  "login_name":"[email protected]","onprem_sid": "",  "password_change_url": "",  "phone_number": "" (...)

Not functioning correctly with Inline-Execute-Assembly. I'm working on resolving this and the C++ BOF version which should allow greater search ranges than the C version currently.


procsearch-BOF.c

Compile and load the .cna:

x86_64-w64-mingw32-gcc -c procsearch-BOF.c -o procsearch-BOF.o

The BOF version is sensitive with buffer sizes so the <range> option isn't present and the output is somewhat limited. Feel free to play around with the buffer sizes but be wary you may get __chkstk errors or the beacon may hang if too large.

Ideally wanted to write this in C++ which I've had working locally with bof-vs but running in beacon returns some mangled unknown symbol errors or crashes. Will update when possible. There's probably a better way of implementing search function/buffers in C but this'll work for now.

I wouldn't recommend searching for a single character like "." in a very large process as it may hang the beacon. Recommend minimum 3 or 4 character search strings when using BOF. You can really crank the range up with the C++ version.

Example dumping dummy user data from Outlook process:


procsearch-BOF.mp4

procinfo.cs

C# utility to print all file version information for the supplied pid. Compile in VS or with csc:

procinfo-csharp


procinfo-BOF.c

C BOF that replicates some of the above functionality, need to figure out issues dumping VerQueryValue(lpVersionInfo, "\\StringFileInfo\\040904b0\\... values.

Compile and load .cna:

x86_64-w64-mingw32-gcc -c procinfo-BOF.c -o procinfo-BOF.o

procinfo-c


procargs-BOF.c

Extract command line arguments for the specified process. Compile and load .cna:

x86_64-w64-mingw32-gcc -c procargs.c -o procargs-BOF.o

image


prockill-BOF.c

Terminate a process (or just use kill in CS, not sure why I made this):

x86_64-w64-mingw32-gcc -c prockill-BOF.c -o prockill-BOF.o

prockill-BOF

proctools's People

Contributors

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