Skip to Content
Python for Offensive PenTest
book

Python for Offensive PenTest

by Hussam Khrais
April 2018
Intermediate to advanced content levelIntermediate to advanced
176 pages
4h 16m
English
Packt Publishing
Content preview from Python for Offensive PenTest

Target directory navigation

We will now address a directory navigation issue. Now, the problem is that browsing directories is restricted to the shell working directories. For instance, if the target has executed our Python script on the Desktop, then our working directory will be the Desktop. And due to shell limitations, we cannot simply type cd and move on to another directory. Remember we learned that some commands won't work in a shell, and cd is one of them.

Once we run our previous TCP reverse shell on both sides, you will see our current working directory is on the Desktop, where our Python exists. Notice what will happen when a cd command is issued to change the current working directory to C:\Users. Our script will become non-responsive ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Python Penetration Testing Cookbook

Python Penetration Testing Cookbook

Rejah Rehim

Publisher Resources

ISBN: 9781788838979Supplemental Content