ECB (Electronic Code Book) is a degenerate mode of operation for block ciphers.
Electronic Codebook mode (ECB) is a mode of operation for block ciphers that involves dividing the message into blocks and encrypting each block independently.
It is the simplest mode of operation, but is considered very weak. Identical plaintext blocks are encrypted into identical ciphertext blocks, which makes it easy for an attacker to circumvent its security. As such, it is not recommended to be used for any secure system. Instead, a secure mode such as Cipher-Block Chaining (CBC) or Counter (CTR) mode should be chosen.
Why ECB is not secure?
ECB is not semantically secure because identical blocks of plaintext will be encrypted to the same ciphertext block. This vulnerability helps the attacker to find out plaintext patterns.