• Stars
    star
    203
  • Rank 192,890 (Top 4 %)
  • Language
    Python
  • Created about 11 years ago
  • Updated about 2 years ago

Reviews

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

Repository Details

Fentanyl is an IDAPython script that makes patching significantly easier

Fentanyl

Introduction

Fentanyl is an IDAPython script that makes patching significantly easier. Fentanyl lets you patch from IDA Pro or Demo easily. Most patches can be done without touching a hex editor but if you must edit raw bytes you can simply use IDA's hex view. You can also undo and redo changes to the idb.

Fentanyl supercedes other tools for binary patching by being able to assemble with IDA's built in assemblers which can support more than x86 and x86_64. Fentanyl also automates commonly performed patches. One of Fentanyl's best features is that it supports Undo/Redo. We can see changes to the graph live and undo them if they aren't to our liking.

Setup (IDA 7.x / Python 3)

Simply move all items from this repository into the following directory:

%IDA%\plugins

The %IDA% directory can usually be found bellow:

C:\Program Files\IDA <version>\

Now on program start, the plugin will be loaded automatically.

Setup (IDA 6.x / Python 2)

Need to add backwards compatibility with IDA 6.x / Python2 or mark as deprecated.

IDAPython

  1. Download IDAPython here.
  2. Move appropriate folders to IDA plugins directory as per the README

IDA PySide

  1. Download (custom built by ancat): Python 2.7 PySide bindings installer or raw.
  2. Extract and move PySide folder to C:\python27\Lib\site-packages\

Usage

Loading Fentanyl.py

IDA 7.x / Python 3

Follow instructions under Setup.

IDA 6.x / Python 2

  1. Alt+F7 or File > Script File to load scripts
  2. Browse to main.py and open it
  3. That's it!

Key Bindings

Some of these keybindings can be accessed by right-clicking on the screen in graph view.

  • Ctrl-Alt-N Convert instructions to nops
  • Ctrl-Alt-X Nop all xrefs to this function
  • Ctrl-Alt-J Invert conditional jump
  • Ctrl-Alt-P Patch instruction
  • Alt-Z Undo modification (Won't always work. Should still be careful editing.)
  • Alt-Y Redo modification (Won't always work. Should still be careful editing.)
  • Ctrl-Alt-S Save file
  • Ctrl-Alt-C Find Code Caves
  • Ctrl-Alt-F Make jump unconditional
  • Alt-N Neuter the binary (remove calls to fork, setuid, setgid, getpwnam, setgroups, and chdir)

Extras

Loading Fentanyl on Startup

Check out this example.

PySide

PySide is annoying to compile. If you don't want to use the PySide binaries available here, or don't want to compile it yourself, you don't actually need it. Fentanyl will not use the GUI if PySide is not available.

More Repositories

1

Hack-Night

Hack Night is an open weekly training session run by the OSIRIS lab.
Python
1,221
star
2

Project-Ideas

A place to discuss potential projects for students of the ISIS Lab.
384
star
3

awesome-rust-security

Curated list of awesome projects and resources related to Rust and computer security
Rust
366
star
4

CTF-Solutions

Solutions to a variety of Capture The Flag challenges from different competitions.
Python
204
star
5

CTF-Challenges

A repository of challenges from various CTF competitions.
Python
152
star
6

Shellcode

Assembly
136
star
7

ctf101

CTF101, a wiki-project documenting Capture The Flag techniques.
117
star
8

CSAW-CTF-2016-Quals

Repo for CSAW CTF 2016 Quals challenges
C
73
star
9

dispatch

Programmatic disassembly and patching
Python
67
star
10

CSAW-CTF-2019-Quals

Challenge Repository for CSAW CTF Quals 2019
Python
56
star
11

CSAW-CTF-2018-Finals

Repo for CSAW CTF 2018 Finals challenges
Python
56
star
12

CSAW-CTF-2017-Quals

Repo for CSAW CTF 2018 Quals challenges
JavaScript
44
star
13

CSAW-CTF-2018-Quals

Repo for CSAW CTF 2018 Quals challenges
CSS
38
star
14

PwnAdventure

Python
31
star
15

Catfish

Catfish is a tool used ease the process of finding ROP gadgets and creating payloads with them.
Python
30
star
16

screwSSH

A frighteningly-easy way of denying access to someone's publicly-accessible OpenSSH server in a default configuration. Originally written by Boris Kochergin.
C++
29
star
17

xnippet

A little tool to execute functions without debugging an entire executable. Originally written by Gonzalo J. Carracedo (BatchDrake).
28
star
18

Giraffe

PHP
27
star
19

CSAW-CTF-2023-Quals

Challenge repository for the 2023 CSAW CTF Qualifiers
PowerShell
27
star
20

ugo-ghidra

Java
21
star
21

imm-taint-trace

Immunity Debugger Taint Tracer
Python
20
star
22

vasilisk

vasilisk
Python
19
star
23

CSAW-CTF-2017-Finals

CTF Finals
C
17
star
24

dllinjection

C++
14
star
25

CSAW-CTF-2016-Finals

CSAW CTF 2016 Finals
JavaScript
14
star
26

CSAW-CTF-2019-Finals

Python
14
star
27

CSAW-CTF-2022-Quals

C#
13
star
28

LeakyPastes-V2

Looking at what people post to public pastebins
Python
12
star
29

CSAW-CTF-2021-Finals

C
8
star
30

armana

Real-time Internet threat monitor
Python
7
star
31

CSAW-CTF-2022-Finals

C
7
star
32

CSAW-CTF-2024-Quals

Public Archive for CSAW 2024 Quals
Shell
7
star
33

CSAW-CTF-2022-Final-WriteUps

C
6
star
34

CSAW-CTF-2021-Quals

Python
6
star
35

kmdhook

C++
6
star
36

HaikuSyscallFuzzer

A fuzzer for the haiku OS
Assembly
6
star
37

wonton_memory

5
star
38

fork-sentry

GitHub Action for detecting and alerting on suspicious forks of your repository
Python
5
star
39

hsdis

CFG generator for HSVM binaries
JavaScript
4
star
40

ugo

IDA Hexrays plugin for Go binaries
C++
4
star
41

DynamicEntry

Dynamic instrumentation of Apache Tomcat to kill XSS.
Java
4
star
42

poser

C
4
star
43

CSAW-CTF-2020-Quals

Challenge repository for CSAW CTF Quals 2020
Python
4
star
44

Jinga

PHP
4
star
45

observability

Grafana stack for logging and metrics
Shell
3
star
46

LeakyPastes

Looking at what people post to public pastebins
Python
3
star
47

CSAW-CTF-2020-Finals

C
3
star
48

superbot-public

Discord Email Verification Bot
JavaScript
3
star
49

csaw-2015-TBBPE

CSAW 2015 challenge
Ruby
1
star
50

CSAW-CTF-2013-Finals

CSAW CTF 2013 Finals
Python
1
star
51

CSAW-CTF-2014-Finals

CSAW CTF 2014 Finals
PHP
1
star
52

kek-tools

C++
1
star
53

CSAW-CTF-2013-Quals

CSAW CTF 2013 Quals
Python
1
star
54

CSAW-CTF-Anubis-2020

JavaScript
1
star
55

CSAW-RED-2018-Quals

Challenge repository
Python
1
star
56

CSAW-CTF-2015-Quals

CSAW CTF 2015 Quals
CSS
1
star
57

CSAW-RED-2020-Quals

CSS
1
star
58

CSAW-CTF-2014-Quals

CSAW CTF 2014 Quals
Python
1
star
59

CSAW-CTF-2015-Finals

CSAW CTF 2015 Finals
C
1
star
60

CSAW-RED-2020-Finals

Repository for the CSAW RED 2020 Finals challenges
HTML
1
star
61

CSAW-CTF-2023-Finals

Challenge repository for the 2023 CSAW CTF Finals
Python
1
star
62

recruit-CTFd

Python
1
star