You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When enumerating network interfaces, if it's on a docker container, the "ip" command will return a non 0 return code, which will cause no output.
Suggested fix is to remove the check=True from the ip addr command (and also recommend adding an ifconfig option as well :) ), so that the module continues without checking the error code
pwncat version
pwncat-cs --version
0.5.4
Target System (aka "victim")
Ubuntu docker image:
amd64/ubuntu:20.04
Steps to Reproduce
Steps to reproduce the behavior:
Run docker run --network host -it --rm amd64/ubuntu:20.04 bash
set up pwncat listener: pwncat-cs -lp 4444
catch reverse shell from docker container
try and run run enumerate.system.network in pwncat
on docker container:
5.1. run ip addr
5.2 run echo $? to see non zero return code
Expected Behavior
Expect networking info to be printed
Screenshots
The text was updated successfully, but these errors were encountered:
There is actually an error in the execution of the ip addr command. It appears there is some weird edge case for the interface where ip can't get the address information for eth0@if12. It's possible the ip -json output could still be readable in that case, but I'm not sure if that switch is widely available across ip versions. We can't reliably parse the output of ip if there's an error, though.
I can't reproduce this on a local instance of amd64/ubuntu:20.04 though. It looks like you have some odd network configuration. Can you post the output of ip -json addr to see if there is usable output with that switch enabled.
Bug Description
When enumerating network interfaces, if it's on a docker container, the "ip" command will return a non 0 return code, which will cause no output.
Suggested fix is to remove the
check=True
from the ip addr command (and also recommend adding anifconfig
option as well :) ), so that the module continues without checking the error codepwncat version
Target System (aka "victim")
Ubuntu docker image:
Steps to Reproduce
Steps to reproduce the behavior:
docker run --network host -it --rm amd64/ubuntu:20.04 bash
pwncat-cs -lp 4444
run enumerate.system.network
in pwncat5.1. run
ip addr
5.2 run
echo $?
to see non zero return codeExpected Behavior
Expect networking info to be printed
Screenshots
The text was updated successfully, but these errors were encountered: