- This topic has 3 replies, 3 voices, and was last updated 4 years, 3 months ago by .
- You must be logged in to reply to this topic.
Hi,
I wonder what’s the reasoning behind using the subprocess.check_output() instead of the subprocess.Popen()?
It feels to me like a better solution, since it would work on all commands, and there would be no need to add all wanted commands (like ‘cd’) separately.
From what i understand, using ‘stdout’ and ‘stderr’ = subprocess.PIPE provides all the functionality with less code, and supports all future commands (not only ‘cd’).
Is there something else to consider, that makes you choose subprocess.check_output() in your videos?
I don’t understand this sentence from .Popen documentation: “Execute a child program in a new process”. Maybe that’s what is undesirable in a backdoor?
Thanks for all the great content and support!
Hello Bartosz,
Yeah see I chose to implement the cd like this because it is a more clean way of doing it, also doing it using the check_output or Popen will have the same effect which would basically execute the command successfully but won’t actually change the working directory.
And yes I wanted the commands to be executed in the same process, that way the backdoor will pause and only continue running once the command finishes execution.
I see.
Makes sense π
Thank you!
You’re welcome, I’m glad we could help:)
Not a member yet? Register now
Are you a member? Login now
Enroll in this course to access this lesson!
All of our courses include:
β Lifetime, unlimited access to course materials & training videos.
β Verifiable certificate of completion from zSecurity, signed by the course instructor, Zaid.
β Get answers from our Support Team within a maximum of 15 hours.
β Unlimited Updates.
Get free 1 month VIP membership per course with:
β Live mentorship and Q&A session with the course instructor, Zaid.
β Instant support from community members through our private discord channel.
β Daily updates with the latest tutorials & news in the hacking world.
β Daily resources like CTFs, bug bounty programs, onion services and more!
β Access our VIP community & connect with like-minded people.
β Discounts on other zSecurity products and services.
This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
This website uses Google Analytics and Linkedin to collect anonymous information such as the number of visitors to the site, and the most popular pages.
Keeping this cookies enabled helps us to improve our website.
Please enable Strictly Necessary Cookies first so that we can save your preferences!