• Stars
    star
    108
  • Rank 319,414 (Top 7 %)
  • Language
    Python
  • License
    Other
  • Created over 5 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

MrsPicky - An IDAPython decompiler script that helps auditing memcpy() and memmove() calls

MrsPicky

MrsPicky - An IDAPython decompiler script that helps auditing calls to the memcpy() and memmove() functions.

mrspicky animated gif

This example code shows how the HexRays decompiler can be scripted in order to identify potentially dangerous calls to memcpy() function calls. It is in no way meant to be a fully working script covering all possible use cases but just a few instead.

It will display a list of identified calls that can be and is meant to be searched, sorted and filtered interactively using IDA's built-in filtering features. Double clicking an entry will jump to the respective call within the currently active IDA or Decompiler view.

In cases where the "n" argument that is passed to memcpy() calls can be resolved statically, the resulting list's "max n" tab reflects the maximum number of bytes that the destination buffer "dst" can be written to (in other words: any number larger than that will corrupt whatever follows the current stack frame, which usually is a return address.

The "problems" tab may contain the following keywords:

  • "memcorr" - indicates a confirmed memory corruption
  • "argptr" - the "dst" pointer points beyond the local stack frame (this may not actually be a problem per se but...)

Feel free to adjust the script to suit your personal preferences. Relevant code is commented and explained below so that hopefully it will be easy to adapt the code to cover more use-cases as well as further functions such as malloc() whatsoever.

Requirements

This script is based on Python3 and requires IDA 7.3 to work. Python2 version is available here.

For further help, check out vds5.py that comes with the HexRays SDK.

This script is licensed under the "THE BEER-WARE LICENSE" (Revision 42) license.

More Repositories

1

dsync

IDAPython plugin that synchronizes disassembler and decompiler views
Python
438
star
2

HexraysToolbox

Hexrays Toolbox - Find code patterns within the Hexrays ctree
Python
422
star
3

HRDevHelper

HexRays ctree visualization plugin
Python
349
star
4

abyss

abyss - augmentation of Hexrays decompiler output
Python
315
star
5

IDACyber

Data Visualization Plugin for IDA Pro
Python
285
star
6

genmc

Display Hex-Rays Microcode
Python
220
star
7

IDAPyHelper

IDAPyHelper is a script for the Interactive Disassembler that helps writing IDAPython scripts and plugins.
Python
163
star
8

xray

Hexrays decompiler plugin that colorizes and filters the decompiler's output based on regular expressions
Python
114
star
9

RETracker

Reverse Engineering Framework for the Polyend Tracker
Python
93
star
10

FuncScanner

Collects extended function properties from IDA Pro databases
Python
91
star
11

hexrays_scripts

Various scripts for the Hexrays decompiler
Python
87
star
12

DrGadget

dr.rer.oec.gadget IDAPython plugin for the Interactive Disassembler <ABANDONED PROJECT>
Python
62
star
13

nesldr

Nintendo Entertainment System (NES) ROM loader module for IDA Pro (for IDA 4.9)
C++
46
star
14

NDSLdr

Nintendo DS ROM loader module for IDA Pro
C++
34
star
15

NECromancer

IDA Pro V850 Processor Module Extension
Python
30
star
16

idaplugins

Old and probably outdated IDA plugins
C++
24
star
17

NTRDisasm

Annotated disassembly of the NTR 2.x custom firmware for the Nintendo N3DS
Assembly
24
star
18

BFS2019

Bluefrost Exploitation Challenge 2019 - Exploit and Writeup
Assembly
21
star
19

zohocorp_dc

Zoho ManageEngine Desktop Central CVEs
Python
15
star
20

winmagic_sd

Technical Write-Up on and PoC Exploit for CVE-2020-11519 and CVE-2020-11520
Python
13
star
21

iOS-stuff

tools, hacks and stuff for iOS (this is old stuff based on an old iOS version and wasn't tested for functioning on recent iOS devices)
Python
13
star
22

MadNES

IDA plugin to export symbols and names from IDA db so they can be loaded into FCEUXD SP
C++
12
star
23

ida_vs2017

IDA 7.x VisualStudio 2017 Sample Project for IDA and HexRays plugins (works with Community Edition)
C++
11
star
24

bankswitch

IDA Pro plugin module for NES ROMs, simulates bank switching/paging
C++
10
star
25

A5Pack

Firmware Utility for ASM Hydrasynth Synthesizers
Python
8
star
26

NESTrainers

NES Game Hacking examples (adding cheating functionality/trainers)
Assembly
8
star
27

tools

various tools
Python
8
star
28

vds5plugin

vds5plugin - vds5.py script taken from IDAPython and turned into a plugin
Python
6
star
29

3DSProjects

Nintendo 3DS Projects
C
5
star
30

CTFs

Write-ups and solutions for CTF challenges
Python
5
star
31

FEZ

FEZ tools and stuff
Python
3
star
32

nesdbg

Failed attempt in creating an IDA Pro debugger plugin for NES ROMs
C++
2
star
33

touchosc-templates

Templates / Layouts for the touchosc iOS app
2
star
34

FancyVote

My solution to the BFS Ekoparty Exploitation Challenge
Python
2
star