GitXplorerGitXplorer
D

ptrace_experiments

public
0 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
1439e5d1e796bd326fddc805033da8f84bf1bacb

Merge branch 'main' of github.com:Alan32Liu/ptrace_experiments

DDonggeLiu committed 3 years ago
Unverified
7b92c52fc7bf0ab9a3a30873362da3a13c36b753

initial commit

DDonggeLiu committed 3 years ago
Verified
73b9befd52bbc33d3a86e50b9fc0223794c8c060

Create README.md

DDonggeLiu committed 3 years ago
Verified
4a3e627ce536447523e3cac18494b14268f4906f

Initial commit

DDonggeLiu committed 3 years ago

README

The README file for this repository.

ptrace_experiments

Experimenting shell injection with ptrace.

Steps

  1. Build docker image ptrace-exp:
docker build . --tag ptrace-exp
  1. Run image ptrace-exp:
docker run --name ptrace-1 --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -it ptrace-exp  bash
  1. In container, run tracee, copy the pid printed:
(docker) ./tracee
  1. From another session, access the same container from the outside:
docker exec -it ptrace-1 /bin/bash
  1. In container, run tracer to inject:
(docker) ./tracer <pid>
  1. Now we should be able to run arbitrary commands from the first session.