'How does the block protection system work in Proof-of-Stake?

Let's say we have a block that contains a signature.

Example:

Block {
   Id,
   Transactions,
   PreviousHash,
   Hash,
   Signature,
   Validator
}

The block was signed by the validator. What prevents an attacker from taking a block, changing the coinbase transaction, recalculating the hash, and signing the block with his private key? How do I check that the block is really valid?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source