Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Python for Offensive PenTest

You're reading from   Python for Offensive PenTest A practical guide to ethical hacking and penetration testing using Python

Arrow left icon
Product type Paperback
Published in Apr 2018
Publisher Packt
ISBN-13 9781788838979
Length 176 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Hussam Khrais Hussam Khrais
Author Profile Icon Hussam Khrais
Hussam Khrais
Arrow right icon
View More author details
Toc

Table of Contents (8) Chapters Close

Preface 1. Warming up – Your First Antivirus-Free Persistence Shell 2. Advanced Scriptable Shell FREE CHAPTER 3. Password Hacking 4. Catch Me If You Can! 5. Miscellaneous Fun in Windows 6. Abuse of Cryptography by Malware 7. Other Books You May Enjoy

Protecting your tunnel with RSA


In this section, we will be using the RSA asymmetric algorithm to protect our tunnel. Now, to review the requirements for asymmetric encryption: as we said, each entity has its own key pair; when I say key pair, I mean a public and a private key. The final key-pair distribution will be as follows. The client will hold its own private key and the server's public key. On the other side, the server or the Kali machine will hold its own private key and the target's public key. So, when we want to send a message or command to our target from the Kali side, first we will encrypt that message using the target's public key and then we will send it over the tunnel in encrypted format. The target will grab that command or message, and using its private key it can decrypt it and extract it back to clear text. The reply, after executing the command, will be encrypted using the server's public key. After that, we will send it out in encrypted format to the network and...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime