DIPD Document
4xpl0r3r/DIPD: Debug with IDA and Pwntools in Docker (DIPD) (github.com)
About
With this, you can debug a program in docker and make use of both IDA and Pwntools
SAFT QUICK POWERFUL(IDA)
Get Started
1  | git clone https://github.com/4xpl0r3r/DIPD.git  | 
- Install docker, docker-compose, and IDA (You can deploy them in separated hosts, but the network between them must be OK)
 - move the binary to 
debug/directory and rename the binary totodebug - run the command 
docker-compose upin the root directory of this project 
Access to the STDIO of binary
1  | nc docker.ip 23458  | 
IDA Pro Debugger Arguments (version 7.6)
- Type: Remote Linux Debugger (Attach)
 - Hostname: docker.ip (the IP of your host which running docker)
 - Port: 23946
 - No password need
 
Caution
- You have to run the binary by netcat or pwntools before attaching the process, or you can’t see the desired process in your IDA
 - You have to run the docker in a 64bit arch Linux to support both 32bit(i386) and 64bit(amd64) debug
 
Demo
Start the DIPD
1  | docker-compose up  | 

Run and connect to the STDIO of your binary
1  | nc docker.ip 23458  | 
Now, your binary should have been running
Let’s use our IDA and start the IDA Debugger

Input Information and click “OK”

Now you can see the processes in your docker, choose ./todebug and click “OK”

Now, you should have got into IDA debug view without any error and exception.
file - docker-compose.yml
image
You can choose the base image as you like, here are some useful options
1  | i386/ubuntu:16.04  | 
You have to run your docker in 64bit Arch to support both i386 and amd64, or the only option is i386
Other arguments
Just have a look at the annotation over there
directory - files
directory - debs
the apt packages for socat, used for fast install and offline support
files - linux_server[64]
IDA Debug Server v7.6
If you don’t want to use IDA v7.6, just replace them with yours
file - init.sh
This file is used for initializing the debug environment, you can modify it to make any adjustment
directory - debug
Just place the binary you want to debug here
If you have an application isn’t having only 1 ELF file, just copy them all to this directory
If you don’t want to change the name of your elf file, you could change the argument debug_name in docker-compose.yml
DIPD Document