Added chdir in privesc to prevent weird permission denied erros during privilege escalation
This commit is contained in:
parent
f6a94254bb
commit
ae47f85d67
|
@ -12,3 +12,5 @@ testing/
|
|||
data/pwncat.sqlite-journal
|
||||
pwncat.sqlite-journal
|
||||
linpeas.txt
|
||||
NOTES.md
|
||||
|
||||
|
|
|
@ -380,6 +380,12 @@ class Finder:
|
|||
readers: List[Technique] = []
|
||||
writers: List[Technique] = []
|
||||
|
||||
# A previous escalation attempt may have left us in a working directory
|
||||
# that causes problems during escalation (e.g. a home directory). Ensure
|
||||
# we are in a safe directory
|
||||
pwncat.victim.flush_output()
|
||||
pwncat.victim.chdir("/tmp")
|
||||
|
||||
for technique in techniques:
|
||||
if Capability.SHELL in technique.capabilities:
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue