Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
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
 Khrais Khrais
Author Profile Icon Khrais
Khrais
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

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

Hybrid encryption key


At this point, you should be able to code and implement both the RSA asymmetric and the AES symmetric encryption, and integrate both of them over our TCP shell. So, now, we will implement a hybrid way to take advantage of both the algorithms. So let's quickly recap. The client will hold its own private key, and the server or the Kali machine will hold the target's public key. Once the TCP connection is started, the Kali machine will generate a random AES key and we will securely send this key to the target side. The reason that I say securely is because the transfer will happen via encryption or via encrypting the random AES key with a target's public key. Once the target gets that message, it will decrypt it using the target private key and extract the AES key back to clear text. At this point, both the Kali and the target machines have the same random generated AES keys which can, and will, be used for AES encryption. Now, the AES encryption at this point will be...

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 $15.99/month. Cancel anytime
Visually different images