All Projects → angr → pypcode

angr / pypcode

Licence: other
Python bindings to Ghidra's SLEIGH library for disassembly and lifting to p-code IR

Programming Languages

C++
36643 projects - #6 most used programming language
python
139335 projects - #7 most used programming language
Yacc
648 projects
assembly
5116 projects
Lex
420 projects
Makefile
30231 projects

Projects that are alternatives of or similar to pypcode

sleighcraft
sleigh craft!
Stars: ✭ 221 (+99.1%)
Mutual labels:  sleigh, ghidra
sleigh
Unofficial CMake build for Ghidra SLEIGH
Stars: ✭ 54 (-51.35%)
Mutual labels:  sleigh, ghidra
GhidraEmu
Native Pcode emulator
Stars: ✭ 25 (-77.48%)
Mutual labels:  pcode, ghidra
Ghidra-SegaSaturn-Processor
A Ghidra processor module for the Sega Saturn (SuperH SH-2)
Stars: ✭ 43 (-61.26%)
Mutual labels:  sleigh, ghidra
ghidra-findcrypt
Ghidra analysis plugin to locate cryptographic constants
Stars: ✭ 138 (+24.32%)
Mutual labels:  ghidra
Azure-Sentinel-4-SecOps
Microsoft Sentinel SOC Operations
Stars: ✭ 140 (+26.13%)
Mutual labels:  ir
ghidra-nsis-extension
Ghidra extension to disassemble NSIS installers
Stars: ✭ 17 (-84.68%)
Mutual labels:  ghidra
ps-srum-hunting
PowerShell Script to facilitate the processing of SRUM data for on-the-fly forensics and if needed threat hunting
Stars: ✭ 16 (-85.59%)
Mutual labels:  ir
JavaScript-compiler
编程语言的本质:语言只是一串字符,我们认为它是什么,它就可以是什么
Stars: ✭ 51 (-54.05%)
Mutual labels:  ir
ghidra scripts
No description or website provided.
Stars: ✭ 24 (-78.38%)
Mutual labels:  ghidra
ghidra-gb
[WIP] A simple Ghidra loader for GameBoy ROMs
Stars: ✭ 11 (-90.09%)
Mutual labels:  ghidra
eBPF-for-Ghidra
eBPF Processor for Ghidra
Stars: ✭ 157 (+41.44%)
Mutual labels:  ghidra
joern
Open-source code analysis platform for C/C++/Java/Binary/Javascript/Python/Kotlin based on code property graphs
Stars: ✭ 968 (+772.07%)
Mutual labels:  ghidra
Ghidra
As it is obvious from the name this is version of NSA Ghidra which actually could be built from sources
Stars: ✭ 24 (-78.38%)
Mutual labels:  ghidra
TS-453Be
Ubuntu on QNAP TS-453Be
Stars: ✭ 48 (-56.76%)
Mutual labels:  ghidra
ATtiny13-TinyRemoteXL
12-Button IR Remote Control
Stars: ✭ 33 (-70.27%)
Mutual labels:  ir
allsummarizer
Multilingual automatic text summarizer using statistical approach and extraction
Stars: ✭ 28 (-74.77%)
Mutual labels:  ir
ir datasets
Provides a common interface to many IR ranking datasets.
Stars: ✭ 190 (+71.17%)
Mutual labels:  ir
kaiju
CERT Kaiju is a binary analysis framework extension for the Ghidra software reverse engineering suite. This repository is the primary, canonical repository for this project -- file bug reports and wishes here!
Stars: ✭ 150 (+35.14%)
Mutual labels:  ghidra
ghidra-processor-mep
Toshiba MeP-c4 for Ghidra
Stars: ✭ 21 (-81.08%)
Mutual labels:  ghidra

pypcode

pypi Build Status

Machine code disassembly and IR translation library for Python using the excellent SLEIGH library from the Ghidra framework.

This library was created primarily for use with angr, which provides analyses and symbolic execution of p-code.

Quick Start

This package can be installed on Linux, macOS, and Windows platforms for recent (3.6+) versions of both CPython and PyPy. Wheels are provided for several configurations. You can install the latest release from PyPI using pip:

pip3 install pypcode

You can also install the very latest development version from this repository using pip:

pip3 install --user git+https://github.com/angr/pypcode

You can now invoke the pypcode module from command line to translate supported machine code to P-code from command line. Run python -m pypcode --help for usage information. See module source (__main__.py) for examples of using pypcode as a library.

Example

$ python -m pypcode -b x86:LE:64:default test-x64.bin
--------------------------------------------------------------------------------
00000000/2: XOR EAX,EAX
--------------------------------------------------------------------------------
  0: CF = 0x0
  1: OF = 0x0
  2: EAX = EAX ^ EAX
  3: RAX = zext(EAX)
  4: SF = EAX s< 0x0
  5: ZF = EAX == 0x0
  6: unique[0x2580:4] = EAX & 0xff
  7: unique[0x2590:1] = popcount(unique[0x2580:4])
  8: unique[0x25a0:1] = unique[0x2590:1] & 0x1
  9: PF = unique[0x25a0:1] == 0x0

--------------------------------------------------------------------------------
00000002/2: CMP ESI,EAX
--------------------------------------------------------------------------------
  0: CF = ESI < EAX
  1: OF = sborrow(ESI, EAX)
  2: unique[0x5180:4] = ESI - EAX
  3: SF = unique[0x5180:4] s< 0x0
  4: ZF = unique[0x5180:4] == 0x0
  5: unique[0x2580:4] = unique[0x5180:4] & 0xff
  6: unique[0x2590:1] = popcount(unique[0x2580:4])
  7: unique[0x25a0:1] = unique[0x2590:1] & 0x1
  8: PF = unique[0x25a0:1] == 0x0

--------------------------------------------------------------------------------
00000004/2: JBE 0x17
--------------------------------------------------------------------------------
  0: unique[0x18f0:1] = CF || ZF
  1: if (unique[0x18f0:1]) goto ram[0x17:8]
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].