Code Monkey home page Code Monkey logo

mempeek's Introduction

Summary

This is a small command-line tool designed to peek around memory of a running Linux process. It also provides filtering mechanisms similar to Cheat Engine to scan for memory of certain values.

It uses rustyline to maintain a history of command line arguments which is persisted in the .peekieboi file. Allowing "up-arrow" to work across different runs of the tool!

Installing

Simply run cargo install mempeek to install this tool! Then invoke it by running mempeek <pid of process to introspect>

Commands

Expression support

I've added extremely basic support for expressions of various radix as well as add, subtract, multiply, and divide. No support for parenthesis (yet).

This allows you to use an expression like 0x13370000+0o100*4 in any argument to a command which expects a constant value. The default radix for numbers is 16, thus, hex unless you use an 0b, 0o, or 0d prefix

Types

Types may be one of the following:

  • b - u8
  • w - u16
  • d - u32
  • q - u64
  • B - i8
  • W - i16
  • D - i32
  • Q - i64
  • f - f32
  • F - f64

Constraints

Constraints may be any one of the following:

  • =[val] - Equal to [val]
  • ![val] - Not equal to [val]
  • >[val] - Greater than [val]
  • >=[val] - Greater than or equal to [val]
  • <[val] - Less than [val]
  • <=[val] - Less than or equal to [val]

Currently this only supports a few commands

q | exit | quit

Exit the program

h <query index | l>

Get the results from a previous memory scan. Takes the query index of the query to retrieve. Optionally, you can use l in place of the query index to get the most recent query results

s[bwdqBWDQfF] <addr> <length> [constraints]

Scan memory for a value of a given type starting at addr for length bytes using constraints

u[bwdqBWDQfFo] <query #> [constraints]

Using the address list from a previous query, interpret the pointed-to-value as the specified type o implies that the update should use the type of the original query.

d[bwdqBWDQfF] <addr> [<number of bytes>]

Dump memory interpreted as a given type for a given number of bytes

ss <addr> <length> <string>

Search for a string in a region of memory specified by addr and length (in bytes)

m

Dump memory regions and their permissions.

Example

Example of mempeek

Green values in the dump output indicate that the value is a valid pointer when cast to a u64

mempeek's People

Contributors

gamozolabs avatar

Watchers

 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.