I understand executing something like a reverse TCP bind via shell relies on resources being available on the victim machine... and in the case of running a, shall we say, Ruby script from the command line it will be interpreted down to machine code and executed...
My question is, when you drop machine code directly into the remote machine via exploit via Metasploit or such, what if the code doesn't match the CPU? How is it interpreted and executed? Or does it come down to the 'attacker' knowing what payload to use?
Please forgive the high-level question, I am relatively new to penetration testing.