Skip to content

gnusec/linux-process-injection

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

linux-process-injection

About

There are two ways to start debugging a process:

  1. The first and more immediate one, is to make our debugger start the process: fork and exec. This is what happens when you pass a program name as a parameter to gdb or strace.
  2. The other option we have is to dynamically attach our debugger to a running process. This enables process injection.

Project organization

.
├── inject.c
├── README.md
└── samples     # sample applications to inject into

Run

# compile shellcode
nasm -f elf64 -o shellcode.o shellcode.asm

# convert shellcode to C string
./bin2sc.py shellcode.o

# run hello
./hello

# inject shellcode into hello's process
./inject <pid of hello>

References

To read

About

Process injection on Linux.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 92.6%
  • Assembly 7.4%