How to do it...

  1. First, we need to download the package we want to place our payload in; for this recipe we will use cowsay, a simple program that generates an ASCII picture of a cow saying something provided by the user:
root@kali:~# apt --download-only install cowsayReading package lists... DoneBuilding dependency tree Reading state information... DoneThe following packages were automatically installed and are no longer required:  python-brotlipy python-cssutils python-typingUse 'apt autoremove' to remove them.Suggested packages:  filters cowsay-offThe following NEW packages will be installed:  cowsay0 upgraded, 1 newly installed, 0 to remove and 980 not upgraded.Need to get 20.1 kB of archives.After this operation, 90.1 kB of additional ...

Get Metasploit Penetration Testing Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.