From 546061e577d3c6a607da682820a47ec90136e11b Mon Sep 17 00:00:00 2001 From: Zach Riggle Date: Thu, 1 Dec 2016 21:28:20 -0700 Subject: [PATCH] Modify coredump_filter of spawned processes so that library contents are included --- pwnlib/tubes/ssh.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pwnlib/tubes/ssh.py b/pwnlib/tubes/ssh.py index 8d8e989f0..4e1b7667d 100644 --- a/pwnlib/tubes/ssh.py +++ b/pwnlib/tubes/ssh.py @@ -872,6 +872,13 @@ def is_exe(path): resource.setrlimit(resource.RLIMIT_STACK, (-1, -1)) +# Attempt to dump ALL core file regions +try: + with open('/proc/self/coredump_filter', 'w') as core_filter: + core_filter.write('0x3f\n') +except Exception: + pass + # Assume that the user would prefer to have core dumps. resource.setrlimit(resource.RLIMIT_CORE, (-1, -1))