Making a non detected payload is an art, basically you need to know the internals of the destination machine (if is windows, architecture, linux?) and learn assembler. In general AVs tries to find patterns on payloads, for example in linux they will try to find the common int 0x80 (in 32 bits), this is a basic. The main techniques that you can apply for ...
A payload is simply the thing that you actually want to do on a machine. Typical payloads are:
Interactive Shells (Meterpreter, OS Shell, etc.)
Install Malware (Keyloggers, Ransomware, etc.)
Persist Access (SSH, RDP, etc.)
So if your question is "How do I write my own payload?", the actual task ...
I want to use hashcat, but I don't want to use the hashcat binaries.
This isn't how this works. First of all, let's have a look at the project documentation you linked to:
Little wrapper around hashcat so it can be installed via pip. Attempts to also correctly determine which binary you should run and adds hashcat to your path.
As you see, the point of ...
If its on their machine then that eliminates a major attack vector but doesnt necessarily eliminate all of them. I would want to make sure that it is indeed them typing in the formula. There are all different types of scenarios to think about here. What if somebody sends them a spreadsheet and they open it up? Will it execute? What if some social engineering ...
The motivation is in my opinion pretty clear from PEP 506:
... concerns that Python's standard library makes it too easy for developers to inadvertently make serious security errors ... Although the documentation for the random module explicitly states that the default is not suitable for security purposes , it is strongly believed that this warning may ...
The two large primes that make up the RSA private key are different each time you run the script.
I added a line to the end of your script, to output the RSA private key in PEM format produced by the script:
from Crypto.PublicKey import RSA
from Crypto import Random
random_generator = Random.new().read
prv = RSA.generate(4096, random_generator)